[GRASS5] Re: [GRASSLIST:3471] Grass 53cvs with shared libs for OSX ready

Hello Lorenzo

On Mon, 24 May 2004, Lorenzo Moretti wrote:

Grass 5.3cvs 2004_05_15 built with shared libraries is ready.
IT'S ONLY FOR CURIOSITY, NOT FOR WORKING.
It's missing some modules respect than normal 5.3cvs static:

Do you think there might be some command-line flag for your Mac OSX C-compiler that will allow it to ignore the multiply-defined symbols warning and compile all those other modules? Or does anybody else know whether this is possible or not?

If you find something, try adding the flag to the COMPILE_FLAGS line in mk/vars.mk in your build directory and then running
./gmake53 src/mapdev/v.digit
or whatever to see if you can get it working.

We could manually fix all the multiply-symbols but it would be a lot simpler and easier if we were able to find a suitable compiler flag.

Paul

From what I can tell from web and documentation reading, it looks like when -flat_namespace is defined, then it is impossible to suppress the errors regarding multiple symbol definitions. And flat_namespace does seem to be defined in the GRASS build as distributed.

I have experimented a bit with undefining it, but haven't made any progress yet. Also I don't really understand all the possibilities here (e.g. two level name spaces seem to be recommended, but I am also advised: "For the most part, however, unless you are designing a library from scratch, it is not practical to avoid using -flat_namespace if you need to override a library’s references to another library." in the Apple Developer notes).

This is dealt with at:
http://developer.apple.com/technotes/tn2002/tn2071.html#Section8
and
http://www.metapkg.org/wiki/12
and
http://developer.apple.com/documentation/Porting/Conceptual/PortingUnix/

However, I've just tried taking -flat_namespace out of SHLIB_LD in mk/vars.mk and starting the compile over completely, and it doesn't seem to have made a difference. From the documentation, apparently this would put the compiler back in the default of two level namespace and make the default behaviour to be issuing a warning instead of an error for multiply defined symbols, but I am still getting errors. I've also experimented with putting in -twolevel_namespace and -multiply_defined suppress for compiling just v.digit, as suggested by Paul below, but I always get the same errors.

Well, I'm definitely over my head and am giving up for now, but maybe this will mean something to someone...

Scott

On 24 May 2004, at 6:04, Paul Kelly wrote:

Hello Lorenzo

On Mon, 24 May 2004, Lorenzo Moretti wrote:

Grass 5.3cvs 2004_05_15 built with shared libraries is ready.
IT'S ONLY FOR CURIOSITY, NOT FOR WORKING.
It's missing some modules respect than normal 5.3cvs static:

Do you think there might be some command-line flag for your Mac OSX C-compiler that will allow it to ignore the multiply-defined symbols warning and compile all those other modules? Or does anybody else know whether this is possible or not?

------
Scott W. Mitchell Scott_Mitchell@carleton.ca
Department of Geography and Environmental Studies
Carleton University, B349 Loeb Building
Ottawa, ON Canada
+1-613-520-2600 ext 2695