Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 174307 - dev-ada/gtkada-2.8.0 - can't link anything
Summary: dev-ada/gtkada-2.8.0 - can't link anything
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: ada team [OBSOLETE]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-12 18:07 UTC by Tomek Walkuski
Modified: 2007-05-28 07:25 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
gtkada-2.8.0.ebuild (gtkada-2.8.0.ebuild,2.74 KB, text/plain)
2007-04-13 06:55 UTC, George Shapovalov (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomek Walkuski 2007-04-12 18:07:08 UTC
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
Comment 1 George Shapovalov (RETIRED) gentoo-dev 2007-04-13 06:49:38 UTC
(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
Comment 2 George Shapovalov (RETIRED) gentoo-dev 2007-04-13 06:55:57 UTC
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
Comment 3 Tomek Walkuski 2007-04-13 08:13:04 UTC
> 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".  

Comment 4 George Shapovalov (RETIRED) gentoo-dev 2007-05-27 15:00:15 UTC
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
Comment 5 Tomek Walkuski 2007-05-27 17:06:47 UTC
(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.
Comment 6 George Shapovalov (RETIRED) gentoo-dev 2007-05-27 18:32:21 UTC
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
Comment 7 George Shapovalov (RETIRED) gentoo-dev 2007-05-27 19:47:28 UTC
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
Comment 8 George Shapovalov (RETIRED) gentoo-dev 2007-05-28 07:25:04 UTC
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