bugGNUstep - Bugs: bug #25439, ...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #25439: ADDITIONAL_NATIVE_LIB_DIRS/ADDITIONAL_NATIVE_LIBS doesn't appear to work under windows

Submitted by:  matt rice <ratmice>
Submitted on:  Fri 30 Jan 2009 09:36:25 AM UTC  
 
Category: MakefilesSeverity: 3 - Normal
Item Group: BugStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Mon 02 Feb 2009 09:25:21 AM UTC, comment #4:

Matt

it's a good point - but it's expected behaviour - on Windows all libraries are always
linked in, on GNU/Linux only the essential ones.

Now maybe that's not the best behaviour on GNU/Linux - there is already a bug
open about that.

Thanks

Nicola Pero <nico>
Project Member
Sat 31 Jan 2009 11:17:14 PM UTC, comment #3:

Thanks, I looked at why linux never had this issue and during the compile it ignores ADDITIONAL_NATIVE_LIBS entirely when linking a framework (seems to require LIBRARY_DEPENDS_UPON which won't work with nativelibraries) so since the -lEOControl never got there the incorrect -L never caused any failure, let me know if you want me to open a new bug about that.

matt rice <ratmice>
Project Member
Sat 31 Jan 2009 08:43:16 PM UTC, comment #2:

This was much easier than it looked ... the EOAdaptor was trying to link ../EOControl
instead of ../../EOControl.

I fixed the typo and I could build the SQLiteAdaptor on Windows. :-)

Thanks

Nicola Pero <nico>
Project Member
Sat 31 Jan 2009 09:33:58 AM UTC, comment #1:

Thanks Matt

I need a Windows machine to fix this. I'll get to one today.

Anyway if I remember correctly, to link a dll on Windows, the .dll.a needs to be in the
library path, and the .dll needs to be in the PATH (!!).

So to link a local .dll, maybe we also need to add the location to the PATH. :-/

I'll experiment later on today and see if I can fix it.

Thanks

Nicola Pero <nico>
Project Member
Fri 30 Jan 2009 09:36:25 AM UTC, original submission:

redirected from bug #25427

snippets from attachment #17357

gcc -shared -Wl,--enable-auto-image-base -Wl,--out-implib,./obj/libEOControl.dll.a -o ./obj/EOControl-0.dll <lots of .o files> -L/home/glpunzi/GNUstep/Library/Libraries -L/usr/GNUstep/Local/Library/Libraries -L/usr/GNUstep/System/Library/Libraries -lgnustep-base -lgnustep-base -lobjc -lws2_32 -ladvapi32 -lcomctl32 -luser32 -lcomdlg32 -lmpr -lnetapi32 -lm -I.
Creating library file: ./obj/libEOControl.dll.a

later we link a framework against this library using
gcc -shared -Wl,--enable-auto-image-base -Wl,--out-implib,./SQLite3EOAdaptor.framework/./libSQLite3EOAdaptor.dll.a -Wl,--enable-auto-import -o ./SQLite3EOAdaptor.framework/./SQLite3EOAdaptor-0.dll <lots of .o files> -L../EOControl/./obj -L../EOAccess/./obj -L/home/glpunzi/GNUstep/Library/Libraries -L/usr/GNUstep/Local/Library/Libraries -L/usr/GNUstep/System/Library/Libraries -lsqlite3 -lgnustep-base -lEOControl -lEOAccess -lobjc -lws2_32 -ladvapi32 -lcomctl32 -luser32 -lcomdlg32 -lmpr -lnetapi32 -lm -I. || rm -f ./SQLite3EOAdaptor.framework/./libSQLite3EOAdaptor.dll.a

which fails like:
D:\GNUstep\mingw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lEOControl
collect2: ld returned 1 exit status

so we create a library in ../EOControl/obj/
and expect to be able to link to it via -L../EOControl/obj/ (with ADDITIONAL_NATIVE_LIB_DIRS=../EOControl)

i don't know windows but my guess is gcc is looking for libEOControl.dll, but only libEOControl-0.dll and libEOControl.dll.a exist there.

so it appears adding the MAJOR_VERSION of the library filename is breaking the way gdl2 builds everything in place without having to make install every native-library.

matt rice <ratmice>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by nico (Posted a comment)
  • -unavailable- added by ratmice (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 31 Jan 2009 08:43:16 PM UTCnicoOpen/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1