I have modified gtkada-2.4.0-r1.ebuild and gtkada-2.8.0 sources to build GtkAda 2.8.0 Reproducible: Always Steps to Reproduce: 1. Renamed ebuild from gtkada-2.4.0-r1.ebuild to gtkada-2.8.0.ebuild 2. Renamed name of sources downloaded from AdaCore, as above. 3. Created local overlay and successfully merged. Actual Results: When I try compile GtkAda tutorial examples or own piece of code I can't link anything. `gtkada-config` script searches include in /usr/include/gtkada instead of /usr/include/ada/gtkada: tomek@gentoo [~/Dokumenty/ADA/tutorial-examples/packbox] $ make gnatmake packbox_test `gtkada-config` gnatgcc -c -I/usr/include/gtkada packbox_test.adb packbox_test.adb:3:06: file "gtk.ads" not found packbox_test.adb:4:06: file "gtk.ads" not found packbox_test.adb:6:06: file "glib.ads" not found packbox_test.adb:6:06: "Packbox (spec)" depends on "Glib (spec)" packbox_test.adb:6:06: "Packbox_Test (body)" depends on "Packbox (spec)" packbox_test.adb:6:06: "Packbox (spec)" depends on "Gtk (spec)" gnatmake: "packbox_test.adb" compilation error make: *** [all] Błąd 4 And: tomek@gentoo [~/Dokumenty/ADA/tutorial-examples/packbox] $ gnatmake -I/usr/include/ada/gtkada packbox_test.adb gnatbind -aO./ -I/usr/include/ada/gtkada -I- -x packbox_test.ali gnatlink packbox_test.ali b~packbox_test.o: In function `adainit': b~packbox_test.adb:(.text+0x163): undefined reference to `glib___elabs' b~packbox_test.adb:(.text+0x169): undefined reference to `glib_E' (...) packbox_test.adb:(.text+0x1d18): undefined reference to `gtk__box__gtk_new_hbox' packbox_test.adb:(.text+0x1d4f): undefined reference to `gtk__button__gtk_new' packbox_test.adb:(.text+0x21cf): undefined reference to `gtk_main' collect2: ld returned 1 exit status gnatlink: cannot call /usr/i686-pc-linux-gnu/gnat-gcc-bin/4.1/gnatgcc gnatmake: *** link failed. Also revdep-rebuild tool ALWAYS want re-emerge GtkAda. Expected Results: Expected results? Everything should be fine :) Surprisingly downgrade to gtkada-2.4.0-r1 produces this same output
(In reply to comment #0) > Steps to Reproduce: > 1. Renamed ebuild from gtkada-2.4.0-r1.ebuild to gtkada-2.8.0.ebuild > 2. Renamed name of sources downloaded from AdaCore, as above. Huh? You renamed the 2.4 sources to 2.8? But that does not make it 2.8. For that you need the real 2.8 sources from libre2.adacore.com, otherwise, what's the point? Also, sorry about the confusion. Apparently I have the gtkada-2.8.0 in my overlay. IIRC it still had some problems, so I was working on it (so, simple rename of the ebuild did not cut it. I don't quite remember now, but it may have required a newer gnat). > Actual Results: > When I try compile GtkAda tutorial examples or own piece of code I can't link > anything. `gtkada-config` script searches include in /usr/include/gtkada > instead of /usr/include/ada/gtkada: Well, this should be taken care of by the sed instruction in src_unpack. Are you sure you were working off the latest gtkada ebuild? That should be gtkada-2.4.0-r2.ebuild, the only one in portage as of now. The other error messages hint at the problem with your gnat installation in fact. Did you follow the instructions spitted by pkg_postints? (you should see them after the package is merged) The ones about running env-update as root and then source /etc/profile in the session where you intend to use gnat and libs (right after the emerge, this will be picked up the next tipe you login after running env-update). Also, just in case, what gnat compilers do you have installed? The dev-lang/gnat has been deprecated for a long time and soon will be pulled. You should only have gnat-gpl or gnat-gcc or some their combination installed. Can you compile arbitrary Ada code, like your own projects that do not use gtkada or other libs? In any case, if you have problems there, I'd suggest doing a clean reinstall of gnat compiler(s). George
Created attachment 116126 [details] gtkada-2.8.0.ebuild This is the 2.8 ebuid that I have in my overlay. Actually now, that I looked into it, I see that changes were mostly cleanups and making the deps right. This one may resolve the glib linkage error that you had. However this line from your output above: gnatlink: cannot call /usr/i686-pc-linux-gnu/gnat-gcc-bin/4.1/gnatgcc still makes me suspect that you did not activate a new profile after installing the library or may be even some similar issue with the compiler itself. Remember to run env-update after emerging gnat or its libs! George
> Huh? You renamed the 2.4 sources to 2.8? But that does not make it 2.8. For > that you need the real 2.8 sources from libre2.adacore.com, otherwise, what's > the point? Lol, no. I had 2.8 sources from AdaCore, I have not write it clear enough. Yes, I always perform env-update && source /etc/profile I have gnat-gcc and earlier I hadn't problems with gtada-2.4 and other libraries. Only after "upgrade".
Ok, got to this (sorry for the delay - I got shot, just recovered enough to get back to doing stuff). I see what was the problem: apparently there are significant changes under the hood. Even though gtkada, following the same commands in the ebuild, compiles and installs .. something (and btw not complaining - there are die's everywhere), it does not install hald of what should be installed, it seems. All the libs are missing and I need to check the sources.. Now I onlyneed to fix this :).. George
(In reply to comment #4) > Ok, got to this (sorry for the delay - I got shot, just recovered enough to get > back to doing stuff). > Happy to hear it! I have same thing with gtkada-2.10.0, I saw - there is no gtkada-config script in src/ directory. And after make... there is some access violation with install... Maybe tomorrow I will write more.
Ok, 2.8.0 is in the tree, please test. The ebuild actually had to be changed somewhat, like in totally rewritten :). Will try 2.0.0 soon. George
2.10 seems similar to 2.8, even in that the provided make install does not actually install libs :) (the .so and .a files). A list of things to improve/take care, so that I don't fogret: 1. make sure all ad? files are installed. I think I skipped some in the subdirs in the 2.8 2. install info files 3. should I pregenerate gpr files? Right now the whole dir is installed and user should rum make himself basically. George
2.10.0 is in the tree and pp. 1 and 2 are implemented (and backported to 2.8.0). I'll let p. 3 slide for now, as I did not do anything yet about providing .gpr files for the libs in general yet. George