libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: different linker parameters from similar Makefiles when building MSV


From: Dave Cottlehuber
Subject: Re: different linker parameters from similar Makefiles when building MSVC DLLs in cygwin (with erlang wrappers)
Date: Thu, 30 Jun 2011 22:13:03 +1200

On 30 June 2011 01:51, Peter Rosin <address@hidden> wrote:
>>> What is cc.sh? Some kind of wrapper I suppose?
>> yup, provided with Erlang/OTP as part of their build chain under
>> windows & other platforms.
>
> Is cc.sh available for anyone to have a peek at it?

https://github.com/erlang/otp/tree/dev/erts/etc/win32/cygwin_tools/vc/cc.sh
https://github.com/erlang/otp/tree/dev/erts/etc/win32/cygwin_tools/vc/ld.sh

>>> Have you checked how the libtool testsuite fares when run with that wrapper?
>> Built from git; passes make -k without issue.

Aah sorry my misunderstanding - for some reason I assumed make -k did
the checks.... my bad; not unix expert. Libtool make runs without err.
Output of make check (which takes like 6 hours to run under cygwin!):

SKIP: tests/cdemo-undef.test
SKIP: tests/tagdemo-undef.test
======================
All 122 tests passed
(2 tests were not run)
======================

[snip]
54: bindir install tests                            FAILED (bindir.at:338)
[snip]
ERROR: 111 tests were run,
5 failed (4 expected failures).
15 tests were skipped.## -------------------------- ##

## testsuite.log was created. ##
## -------------------------- ##

https://www.dropbox.com/s/qzt0vprbtmabp8x/test-suite.log
054 failure is here:
https://www.dropbox.com/s/qzcpaf75idobc9u/testsuite_054.log

NB libtool is built under native cygwin i.e. not with the erlang
wrappers. Once built and installed under cygwin I then retested using
the erlang wrappers & got the same results (6 more hours..)

> How is the compiler selected as cc.sh? I wouldn't guess that autoconf
> would find a compiler named cc.sh without help.

When compiling Erlang we run a whole setup environment script
otp_build https://github.com/erlang/otp/blob/dev/otp_build

Which is designed to ensure your path is correctly set up. The gist is;
- first erlang (the bootstrap compiler and wrapper scripts)
- MSVC binaries (cl, lc, mc, link, mt,...)
- dotNet framework
- SDK 7.0 and 6.0
- helpers & libraries - OpenSSL, NSIS and Inno5 installers
- cygwin tools
- last the original windows path

>> The Erlang scripts already use these flags but passed through in the
>> scripts themselves. Would you mind clarifying a bit what the above
>> should do differently?
>
> Yes, they probably do, but not in a way that libtool sees them, at least
> not for C++ (snappy).
>
>> While I agree with your points, I still don't see where in libtool
>> source it decides _not_ to use '-dll' (as it does on the working
>> ejson), and switches on '-shared -nostdlib' and '-Xlinker -out-implib
>> -Xlinker \$lib'. The wrapper scripts etc are a mess but the different
>> behaviour in libtool seems like a good place to fix the underlying
>> issue - almost certainly an upstream one!
>
> The reason it is failing for snappy seems to be that the CXX tag is
> configured differently from the CC tag. --tag=CC is working, --tag=CXX
> is not.
>
> For CXX, libtool appears to choose the "gcc path" through libtool which
> is why you get these -shared -nostdlib options etc, but you have not
> provided enough detail for me to figure out why the two tags differ.

Thanks - this might be enough to help me make some more progress also.

Cheers
Dave



reply via email to

[Prev in Thread] Current Thread [Next in Thread]