[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Skip need_lib_prefix.at on systems without lib prefix on lib
Re: [PATCH] Skip need_lib_prefix.at on systems without lib prefix on libraries.
Wed, 22 Sep 2010 09:35:22 +0200
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:18.104.22.168) Gecko/20100802 Thunderbird/3.1.2
Den 2010-09-20 23:30 skrev Roumen Petrov:
> Peter Rosin wrote:
>> Den 2010-09-18 00:04 skrev Roumen Petrov:
>>> Hi Peter,
>>> Peter Rosin wrote:
>>>> need_lib_prefix.at currently fails with MSVC.
>>> Hmm probably test fail as shared library is build without -no-undefined
>>> Did libtool MSC allow creation of shared libraries without -no-undefined ?
>>> On windows platforms (msc, gcc(mingw*)) may be the test require some PATH
>>> (as example like func_fix_path from static.at test)
>> You are barking up the wrong tree, since:
>> 1. The test passes on MinGW and Cygwin with gcc, if wouldn't do that if
>> -no-undefined was the cause of the fail.
>> 2. The patch in the old quoted message makes the test pass on MSVC, which
>> it wouldn't do if -no-undefined was the cause of the fail.
>> "PATH magic" is not relevant if -no-undefined is not passed, since everything
>> should be static in that case (no dlls created).
> But the libtool command contain -rpath so the test build shared and static
> libraries .
> 1) linux native build:
> $ cd .../testsuite.dir/086
> $ strace -f ./main 2>&1 | grep foo
> open("XXXX/.libs/tls/i686/libfoo1.so", O_RDONLY) = -1 ENOENT (No such file or
> open("XXXX/.libs/tls/libfoo1.so", O_RDONLY) = -1 ENOENT (No such file or
> open("XXXX/.libs/i686/libfoo1.so", O_RDONLY) = -1 ENOENT (No such file or
> open("XXXX/.libs/libfoo1.so", O_RDONLY) = 3
> open("XXXX/.libs/libfoo2.so", O_RDONLY) = 3
> write(1, "libfoo1: 2\nlibfoo2: 3\n", 22libfoo1: 2
> libfoo2: 3
> $ ls .../testsuite.dir/086/.libs/
> foo1.la@ foo1.lai foo1.o foo2.o libfoo1.a libfoo1.so* libfoo2.a
> libfoo2.la@ libfoo2.lai libfoo2.so* lt-main* main* mainS.o
> Result test pass. Both static and shared libraries are created. The
> executable load shared.
Of course. This is on a "normal" system where every library normally
has a 'lib' prefix and that also has need_lib_prefix="no", because it
really doesn't need the prefix. The test is valid on such "normal"
systems, since it is designed to expose problems on "weird" systems
where need_lib_prefix="unknown", even if the testsuite is running on a
"normal" system. I can only speculate, but I would guess that the test
is there to catch regressions early, before they happen on the "weird"
systems that are not normally used in the development of libtool.
*spends a minutes or two digging in git history*
Let's quote the commit message from when the test was added:
Add a test to simulate a failure visible on systems which
need a library prefix like 'lib', such as BeOS. Fix a number
of bugs exposed by this test in order for it to pass.
Currently the prefix is hardcoded as 'lib', as I am not aware
of systems that require a different prefix:
My patch disables the test on MSVC, because it doesn't like the
hardcoded 'lib' prefix.