Make fail. Error 'BSF_KEEP_G' undeclared.

25 views
Skip to first unread message

connor....@codethink.co.uk

unread,
Oct 31, 2017, 12:18:27 PM10/31/17
to muen-dev
Hello, first time posting here. I am trying to build Muen so that I can emulate it in Bochs. I am getting the following error:

support/bfdgen.c: In function 'main':
support/bfdgen.c:153:83: error: 'BSF_KEEP_G' undeclared (first use in this function)
   printf("   BSF_KEEP_G                  : constant Symbol_Flags := 16#%04x#;\n", BSF_KEEP_G);
                                                                                   ^
support/bfdgen.c:153:83: note: each undeclared identifier is reported only once for each function it appears in
Makefile:183: recipe for target 'bin/bfdgen' failed
make[4]: *** [bin/bfdgen] Error 1

The error occurs in the file 'muen-git-clone/contrib/ada-bfd/tmp/ada-bfd/support/bfdgen.c'.

I have set the PATH to the appropriate SPARK and GNAT bin folders (they weren't installed in the default /opt location although I can't imagine this being a problem). I have installed all relevant packages mentioned in the Muen documentation and have also tried both the 2017 and 2016 versions of GNAT/SPARK.

I have already searched for this particular error within this group. I am trying to build Muen on Debian 9.1.

Thanks in advance for any help,
Connor.

Adrian-Ken Rueegsegger

unread,
Oct 31, 2017, 12:42:47 PM10/31/17
to muen...@googlegroups.com
Hello Connor,

Welcome to the list!

On 10/31/2017 05:18 PM, connor....@codethink.co.uk wrote:
> Hello, first time posting here. I am trying to build Muen so that I can
> emulate it in Bochs. I am getting the following error:
>
> support/bfdgen.c: In function 'main':
> support/bfdgen.c:153:83: error: 'BSF_KEEP_G' undeclared (first use in this
> function)
> printf(" BSF_KEEP_G : constant Symbol_Flags :=
> 16#%04x#;\n", BSF_KEEP_G);
>
> ^
> support/bfdgen.c:153:83: note: each undeclared identifier is reported only
> once for each function it appears in
> Makefile:183: recipe for target 'bin/bfdgen' failed
> make[4]: *** [bin/bfdgen] Error 1
>
> The error occurs in the file
> 'muen-git-clone/contrib/ada-bfd/tmp/ada-bfd/support/bfdgen.c'.

This is a problem in the ada-bfd library for which we submitted a patch
upstream [1]. We fixed the compilation issue in the Muen devel branch,
see commit 9b54ee0 [2].

To solve the problem, you can either switch to the devel branch or
cherry-pick the commit into your local working branch.

Regards,
Adrian

[1] - https://github.com/stcarrez/ada-bfd/pull/3
[2] - https://git.codelabs.ch/?p=muen.git;a=commit;h=9b54ee0

connor....@codethink.co.uk

unread,
Nov 1, 2017, 9:59:22 AM11/1/17
to muen-dev
Thanks Adrian that fixed it. I am now however getting an error about a missing repository fatal: repository 'https://github.com/AdaCore/gnatcoll.git/' not found. I have manually gone looking for this page on AdaCore's Github and it doesn't appear to exist. What is your advice?

Thanks,
Connor.

Adrian-Ken Rueegsegger

unread,
Nov 1, 2017, 10:19:58 AM11/1/17
to muen...@googlegroups.com
Hi,

On 11/01/2017 02:59 PM, connor....@codethink.co.uk wrote:
> Thanks Adrian that fixed it. I am now however getting an error about a

Good to hear that it fixed the problem for you.

> missing repository fatal: repository
> 'https://github.com/AdaCore/gnatcoll.git/' not found. I have manually gone
> looking for this page on AdaCore's Github and it doesn't appear to exist.
> What is your advice?

AdaCore is currently reorganizing their Github repositories, that is why
gnatcoll is not accessible right now. We have been told that it should
be back again soon.

In the meantime you can use our (inofficial) gnatcoll mirror at [1]. I
just pushed the devel-gnatcoll branch [2] which switches the gnatcoll
URL to the mirror. Please give that a try.

Hope this helps,
Adrian

[1] - https://github.com/codelabs-ch/gnatcoll
[2] -
https://git.codelabs.ch/?p=muen.git;a=shortlog;h=refs/heads/devel-gnatcoll

connor....@codethink.co.uk

unread,
Nov 1, 2017, 12:35:11 PM11/1/17
to muen-dev
Thanks again Adrian, I am now getting much further into the build process. It failed during "make policy merge" with a "Permissions denied" error when trying to remove 'muen-git-clone/policy/obj/cspecs'. My solution just in case it helps anyone else in the future was to change (recursively) the ownership and then the read/write permissions of obj to my current user from root.

I am now however getting
make[2]: Entering directory '.../muen-git-clone/components/libxhcidbg'
make[2]: *** No targets specified and no makefile found.  Stop.
make[2]: Leaving directory '.../muen-git-clone/components/libxhcidbg'
Makefile:29: recipe for target 'libxhcidbg' failed
make[1]: *** [libxhcidbg] Error 2
make[1]: Leaving directory '.../Muen/muen-git-clone/components'
Makefile:22: recipe for target 'components' failed
make: *** [components] Error 2

Note: I added '...' to give only relative paths rather than the full paths. The folder 'muen-git-clone/components/libxhcidbg' is empty.

Thanks,
Connor.

Adrian-Ken Rueegsegger

unread,
Nov 1, 2017, 12:48:12 PM11/1/17
to muen...@googlegroups.com
Hi Connor,

On 11/01/2017 05:35 PM, connor....@codethink.co.uk wrote:
> Thanks again Adrian, I am now getting much further into the build process.
> It failed during "make policy merge" with a "Permissions denied" error when
> trying to remove 'muen-git-clone/policy/obj/cspecs'. My solution just in
> case it helps anyone else in the future was to change (recursively) the
> ownership and then the read/write permissions of obj to my current user
> from root.

That seems odd. Did you run a build as user root? The policy/obj/
directory should only contain files that are generated during the build
process.

> I am now however getting
> make[2]: Entering directory '.../muen-git-clone/components/libxhcidbg'
> make[2]: *** No targets specified and no makefile found. Stop.
> make[2]: Leaving directory '.../muen-git-clone/components/libxhcidbg'
> Makefile:29: recipe for target 'libxhcidbg' failed
> make[1]: *** [libxhcidbg] Error 2
> make[1]: Leaving directory '.../Muen/muen-git-clone/components'
> Makefile:22: recipe for target 'components' failed
> make: *** [components] Error 2
>
> Note: I added '...' to give only relative paths rather than the full paths.
> The folder 'muen-git-clone/components/libxhcidbg' is empty.

Please update the git submodules as follows:

$ git submodule update --init

The Libxhcidbg component [1] was added as a submodule to the devel
branch with commit 28598ca.

Hope this helps.

Regards,
Adrian

[1] - https://git.codelabs.ch/?p=libxhcidbg.git;a=summary

connor....@codethink.co.uk

unread,
Nov 1, 2017, 1:30:45 PM11/1/17
to muen-dev
Hello Adrian,


That seems odd. Did you run a build as user root? The policy/obj/
directory should only contain files that are generated during the build
process.

I just ran with make as a normal user, I thought it a little odd


Please update the git submodules as follows:

$ git submodule update --init

The Libxhcidbg component [1] was added as a submodule to the devel
branch with commit 28598ca.


This did the trick, I will get to emulating tomorrow, thanks for all of your help,
Connor.

Adrian-Ken Rueegsegger

unread,
Nov 2, 2017, 7:20:32 AM11/2/17
to muen...@googlegroups.com
On 11/01/2017 03:19 PM, Adrian-Ken Rueegsegger wrote:
> In the meantime you can use our (inofficial) gnatcoll mirror at [1]. I
> just pushed the devel-gnatcoll branch [2] which switches the gnatcoll
> URL to the mirror. Please give that a try.

FYI: this change has been merged into devel [1] and the devel-gnatcoll
branch has been removed.

Regards,
Adrian

[1] - https://git.codelabs.ch/?p=muen.git;a=commit;h=3d3eb3d
Reply all
Reply to author
Forward
0 new messages