Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testgtk fails to find gcc in home directory #35

Open
TamaMcGlinn opened this issue Dec 19, 2020 · 0 comments
Open

testgtk fails to find gcc in home directory #35

TamaMcGlinn opened this issue Dec 19, 2020 · 0 comments

Comments

@TamaMcGlinn
Copy link

The actual gtk installation seems to work, but the subsequent test of the install fails.

To install, I did ./configure --with-GL=no and then sudo make all install.

That fails with:

/opt/GNAT/2020/bin/../libexec/gcc/x86_64-pc-linux-gnu/9.3.1/ld: /home/tama/code/ada/adacore/gtkada/src/lib/gtkada/static/libgtkada.a(glib-spawn.
o): in function `glib__spawn__spawn_command_line_async':
glib-spawn.adb:(.text+0x165): undefined reference to `gnat_spawn_command_line_async'
collect2: error: ld returned 1 exit status
/opt/GNAT/2020/bin/../libexec/gcc/x86_64-pc-linux-gnu/9.3.1/ld: /home/tama/code/ada/adacore/gtkada/src/lib/gtkada/static/libgtkada.a(glib-spawn.
o): in function `glib__spawn__spawn_command_line_async':
glib-spawn.adb:(.text+0x165): undefined reference to `gnat_spawn_command_line_async'
collect2: error: ld returned 1 exit status
   link of test_rtree.adb failed
   failed command was: /opt/GNAT/2020/bin/gcc test_rtree.o b__test_rtree.o /home/tama/code/ada/adacore/gtkada/src/lib/gtkada_gl/static/libgtkada
_gl.a /home/tama/code/ada/adacore/gtkada/src/lib/gtkada/static/libgtkada.a -L/home/tama/code/ada/adacore/gtkada//lib -L/home/tama/code/ada/adaco
re/gtkada//bin -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -Wl,--exp
ort-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -lfontconfig -lfreetype -L/home/tama/code/ada/adacore/gtkada/testgtk/obj/ -L/home/tama/code/ada/ad
acore/gtkada/testgtk/obj/ -L/home/tama/code/ada/adacore/gtkada/src/lib/gtkada/static/ -L/home/tama/code/ada/adacore/gtkada/src/lib/gtkada_gl/sta
tic/ -L/home/tama/code/ada/adacore/gtkada/testgtk/task_project/obj/ -L/opt/GNAT/2020/lib/gcc/x86_64-pc-linux-gnu/9.3.1/adalib/ -shared-libgcc /o
pt/GNAT/2020/lib/gcc/x86_64-pc-linux-gnu/9.3.1/adalib/libgnarl.a /opt/GNAT/2020/lib/gcc/x86_64-pc-linux-gnu/9.3.1/adalib/libgnat.a -lrt -lpthrea
d -ldl -Wl,-rpath-link,/opt/GNAT/2020/lib/gcc/x86_64-pc-linux-gnu/9.3.1//adalib -Wl,-z,origin,-rpath,$ORIGIN/..//lib:$ORIGIN/..//bin:$ORIGIN//ob
j:$ORIGIN/..//src/lib/gtkada/static:$ORIGIN/..//src/lib/gtkada_gl/static:$ORIGIN//task_project/obj:/opt/GNAT/2020/lib/gcc/x86_64-pc-linux-gnu/9.
3.1/adalib -o /home/tama/code/ada/adacore/gtkada/testgtk//test_rtree

Noting the double forward slashes in the failed command, I suspect there is an environment variable that needs to be set to tell the Makefile where my GNAT installation is. gnat_spawn_command_line_async is defined in my installation of /opt/GNAT/2020/lib/gnatstudio/libgtkada.so.21.0w as found by doing a find | xargs grep in the GNAT install directory and seeing that that binary file matches.

I also went into testgtk and did: gprbuild -j0 -m -p -XLIBRARY_TYPE=static -Ptestgtk.gpr -aP ../src but it fails with a different error, which is odd:

gprbuild: raised CONSTRAINT_ERROR : unable to locate "/home/tama/code/gcc"
[/opt/GNAT/2020/bin/gprbuild]
0x736c19
0x4f6e01
0x4f88cc
0x4f991e
0x4f9da7
0x4f9e25
0x4b4636
0x4a4474
[/lib/x86_64-linux-gnu/libc.so.6]
0x7f88d5524099
[/opt/GNAT/2020/bin/gprbuild]
0x4a44c7

I have no idea why it would look for a ~/gcc which I don't have. Perhaps this project will only work if located inside /opt/GNAT/2020/somewhere ? Where do you normally place this repository over at AdaCore?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant