[m-dev.] mmake ignoring LDFLAGS
Michael Wybrow
mjwybrow at cs.mu.OZ.AU
Wed Oct 27 19:48:14 AEST 2004
On Wed, 27 Oct 2004, Ian MacLarty wrote:
>
> Does it work if you set EXTRA_LDFLAGS instead of just LDFLAGS?
Nope. Same situation. And in fact, if I print out their values from
within the script 'ml' both those variables have been clobbered and are
now empty.
Michael
> On 27 Oct 2004, at 14:15, Michael Wybrow wrote:
>>
>> I'm been trying to build the source rotd of the Mercury compiler for fink
>> on Mac OS X. I have no problems building it if I pass '--without-readline'
>> to the configure script. If I let the configure script detect readline, it
>> finds and compiles and links the readline tests fine with the fink readline
>> I have in '/sw' (finks root directory). I have the shell variables
>> CPPFLAGS=-I/sw/include and LDFLAGS=-L/sw/lib set and exported during
>> configure, make, etc.
>>
>> The build fails when linking 'libmer_mdbcomp.dylib' in the browser
>> directory with:
>> /usr/bin/libtool: can't locate file for: -lreadline
>>
>> The reason being that by this point the variable LDFLAGS is not being
>> passed as an argument to the 'gcc' command run by 'ml'. This is the gcc
>> command that gets run:
>>
>> gcc -dynamiclib -single_module -undefined error -o libmer_mdbcomp.dylib
>> mdbcomp.pic_o mer_mdbcomp.pic_o mdbcomp.program_representation.pic_o
>> -lmer_std -lmer_rt -lgc -ldl -lreadline -ltermcap -L../boehm_gc
>> -L../mps_gc/code -L../runtime -L../library -L../trace -L../browser
>> /usr/lib/libgcc.a -lm -lc
>>
>> Which succeeds if I manually add '-L/sw/lib'.
>>
>> Does mmake intentionally ignore LDFLAGS or is this possibly a bug with
>> configure not preserving LDFLAGS?
>>
>> Could someone who is a bit more familiar with configure, mmake and ml have
>> a look at this?
>>
>>
>> Thanks,
>> Michael
>> --------------------------------------------------------------------------
>> mercury-developers mailing list
>> Post messages to: mercury-developers at cs.mu.oz.au
>> Administrative Queries: owner-mercury-developers at cs.mu.oz.au
>> Subscriptions: mercury-developers-request at cs.mu.oz.au
>> --------------------------------------------------------------------------
>>
>
> --------------------------------------------------------------------------
> mercury-developers mailing list
> Post messages to: mercury-developers at cs.mu.oz.au
> Administrative Queries: owner-mercury-developers at cs.mu.oz.au
> Subscriptions: mercury-developers-request at cs.mu.oz.au
> --------------------------------------------------------------------------
>
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list