[GRASS5] [bug #2852] (grass) Library - libgrass_interpfl.5.7.cvs.dylib - is not built

this bug's URL: http://intevation.de/rt/webrt?serial_num=2852
-------------------------------------------------------------------------

Subject: Library - libgrass_interpfl.5.7.cvs.dylib - is not built

Platform: Mac OSX
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: 57cvs_041217

libgrass_interpfl.5.7.cvs.dylib is not built.
Following this lib I have 2 missing bin: r.resamp.rst, v.surf.rst.
Last rows in make:
.....
cc -dynamiclib -Wl,-flat_namespace,-U,_cuserid -compatibility_version 5.7 -current_version 5.7
-install_name /Applications/Grass/grass57cvs.app/Contents/Resources/grass-5.7.cvs/lib/
libgrass_interpfl.dylib -o /Volumes/APPLI/src/grass57cvs_041217/dist.powerpc-apple-
darwin6.8/lib/libgrass_interpfl.5.7.cvs.dylib -L/usr/X11R6/lib -L/usr/local/grasslib/lib -L/
Volumes/APPLI/src/grass57cvs_041217/dist.powerpc-apple-darwin6.8/lib -L/usr/local/pgsql/
lib OBJ.powerpc-apple-darwin6.8/func2d.o OBJ.powerpc-apple-darwin6.8/input2d.o
OBJ.powerpc-apple-darwin6.8/vinput2d.o OBJ.powerpc-apple-darwin6.8/interp2d.o
OBJ.powerpc-apple-darwin6.8/output2d.o OBJ.powerpc-apple-darwin6.8/point2d.o
OBJ.powerpc-apple-darwin6.8/secpar2d.o OBJ.powerpc-apple-darwin6.8/segmen2d.o
OBJ.powerpc-apple-darwin6.8/write2d.o OBJ.powerpc-apple-darwin6.8/matrix.o OBJ.powerpc-
apple-darwin6.8/minmax.o OBJ.powerpc-apple-darwin6.8/init2d.o OBJ.powerpc-apple-
darwin6.8/ressegm2d.o OBJ.powerpc-apple-darwin6.8/resout2d.o -lgrass_gis -lgrass_datetime
-lz -lintl -lgrass_vect -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient
-lgrass_dbmibase -L/usr/local/grasslib/lib -lgdal -lgrass_bitmap -lgrass_qtree -
lgrass_interpdata -lgrass_dbmiclient -lgrass_dbmibase -lgrass_gmath -L/usr/local/grasslib/lib
-lfftw -framework vecLib -framework vecLib && ln -sf libgrass_interpfl.5.7.cvs.dylib /
Volumes/APPLI/src/grass57cvs_041217/dist.powerpc-apple-darwin6.8/lib/
libgrass_interpfl.dylib
ld: warning prebinding disabled because dependent library: /Applications/Grass/
grass57cvs.app/Contents/Resources/grass-5.7.cvs/lib/libgrass_gis.dylib is not prebound
ld: Undefined symbols:
_Cats2
_Map2
_Pnts
_count
_driver2
_ff
_sql2
/usr/bin/libtool: internal link edit command failed

NOTE: This library was built in grass57cvs_041213.

-------------------------------------------- Managed by Request Tracker

On Fri, 17 Dec 2004, Request Tracker wrote:

this bug's URL: http://intevation.de/rt/webrt?serial_num=2852
-------------------------------------------------------------------------

Subject: Library - libgrass_interpfl.5.7.cvs.dylib - is not built

Platform: Mac OSX
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: 57cvs_041217

libgrass_interpfl.5.7.cvs.dylib is not built.
Following this lib I have 2 missing bin: r.resamp.rst, v.surf.rst.
Last rows in make:
.....
cc -dynamiclib -Wl,-flat_namespace,-U,_cuserid -compatibility_version 5.7 -current_version 5.7

                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You must have made some changes to your compile flags as those are commented out in CVS

SHLIB_LD should be simply "cc -dynamiclib -single_module"
and any errors in individual modules should be corrected by fixing the errors in the source code of that module, not by tweaking the global compile flags.

Hmm, I'm having no problems with this on the 2004-12-13 CVS snapshot. I don't do CVS updates so I can't say for 12-17, maybe something changed in the code?

This looks like my patch I do for Mac OS X SHLIB_LD. Works for me.

Paul - I've been meaning to get some action on my bug for the SHLIB_LD thing for Mac OS X (#2544). (I thought I sent something out recently to the bug, but I don't see it there) I've been successfully using these changes on all snapshots since I opened the bug.

      SHLIB_CFLAGS="-fno-common"
      SHLIB_LD="cc -dynamiclib -Wl,-flat_namespace,-U,_cuserid -compatibility_version 5.7 -current_version 5.7 -install_name \${LIB_RUNTIME_DIR}/lib\${LIB_NAME}\${SHLIB_SUFFIX}"

The versions are probably not critical, but the key is the install name. The versions should use some sed voodoo to get the grass version string into an acceptable form instead of being hardcoded. I ditched my different settings for Mac OS 10.2 and 10.3 - the dynamic lookup thing for 10.3 was causing problems in a few modules at runtime.

On Dec 17, 2004, at 10:42 AM, Paul Kelly wrote:

On Fri, 17 Dec 2004, Request Tracker wrote:

this bug's URL: http://intevation.de/rt/webrt?serial_num=2852
-------------------------------------------------------------------------

Subject: Library - libgrass_interpfl.5.7.cvs.dylib - is not built

Platform: Mac OSX
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: 57cvs_041217

libgrass_interpfl.5.7.cvs.dylib is not built.
Following this lib I have 2 missing bin: r.resamp.rst, v.surf.rst.
Last rows in make:
.....
cc -dynamiclib -Wl,-flat_namespace,-U,_cuserid -compatibility_version 5.7 -current_version 5.7

                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You must have made some changes to your compile flags as those are commented out in CVS

SHLIB_LD should be simply "cc -dynamiclib -single_module"
and any errors in individual modules should be corrected by fixing the errors in the source code of that module, not by tweaking the global compile flags.

-----
William Kyngesburye <kyngchaos@charter.net>
http://webpages.charter.net/kyngchaos/

"I ache, therefore I am. Or in my case - I am, therefore I ache."

- Marvin

Hello William

On Fri, 17 Dec 2004, William K wrote:

Hmm, I'm having no problems with this on the 2004-12-13 CVS snapshot. I don't do CVS updates so I can't say for 12-17, maybe something changed in the code?

This looks like my patch I do for Mac OS X SHLIB_LD. Works for me.

Paul - I've been meaning to get some action on my bug for the SHLIB_LD thing for Mac OS X (#2544). (I thought I sent something out recently to the bug, but I don't see it there) I've been successfully using these changes on all snapshots since I opened the bug.

      SHLIB_CFLAGS="-fno-common"
      SHLIB_LD="cc -dynamiclib -Wl,-flat_namespace,-U,_cuserid -compatibility_version 5.7 -current_version 5.7 -install_name \${LIB_RUNTIME_DIR}/lib\${LIB_NAME}\${SHLIB_SUFFIX}"

The whole thing compiles fine without the extra stuff (i.e. just "cc -dynamiclib -single_module") on Scott Mitchell's OS X system that he kindly gave me an account on to use for testing. I'm not sure which version it is though. Specific bug reports using the unmodified CVS might be helpful.
After stripping out all the extra stuff as far as I can remember I fixed the bugs in individual modules that had made it need the extra flags like _cuserid etc. Have you given it a try since those fixes? It was done around the time of the 5.4.0 release as far as I can remember.

The versions are probably not critical, but the key is the install name. The versions should use some sed voodoo to get the grass version string into an acceptable form instead of being hardcoded.

Radim has done some work on that. I'm not very up-to-date with it except that it has never caused me problems.

Paul

On Dec 17, 2004, at 2:13 PM, Paul Kelly wrote:

      SHLIB_CFLAGS="-fno-common"
      SHLIB_LD="cc -dynamiclib -Wl,-flat_namespace,-U,_cuserid -compatibility_version 5.7 -current_version 5.7 -install_name \${LIB_RUNTIME_DIR}/lib\${LIB_NAME}\${SHLIB_SUFFIX}"

The whole thing compiles fine without the extra stuff (i.e. just "cc -dynamiclib -single_module") on Scott Mitchell's OS X system that he kindly gave me an account on to use for testing. I'm not sure which version it is though. Specific bug reports using the unmodified CVS might be helpful.
After stripping out all the extra stuff as far as I can remember I fixed the bugs in individual modules that had made it need the extra flags like _cuserid etc. Have you given it a try since those fixes? It was done around the time of the 5.4.0 release as far as I can remember.

haven't tried without the -U,_cuserid option recently, I'll give that a try soon. The key is the -install-name option. I did try the -single-module option when it changed from what it was previously, but it had the same effect (it's just simpler option). That effect is that the embedded path for libs in the grass libs would be the source tree copies before installation. I think I tried -single-module with -install-name, but I'm not sure. I'll try again, otherwise it would have to be -flat_namespace and -fno-common.

Heck, if Lorenzo's doing the same thing to SHLIB_LD, it must be right? :slight_smile: At least it looks like he has a better handle on Mac OS X porting stuff than I do.

The versions are probably not critical, but the key is the install name. The versions should use some sed voodoo to get the grass version string into an acceptable form instead of being hardcoded.

Radim has done some work on that. I'm not very up-to-date with it except that it has never caused me problems.

Work on the version string? I'll look into that, I vaguely recall something about that also. I've just been lazy (it works), but it would be nice to not have to worry about manually changing the version number here when it does eventually change.

-----
William Kyngesburye <kyngchaos@charter.net>
http://webpages.charter.net/kyngchaos/

First Pogril: Why is life like sticking your head in a bucket filled with hyena offal?
Second Pogril: I don't know. Why IS life like sticking your head in a bucket filled with hyena offal?
First Pogril: I don't know either. Wretched, isn't it?

-HitchHiker's Guide to the Galaxy