Re: [PUSHED] Re: make check problem in libtest_smoketest building master

2012-05-03 Thread Stephan Bergmann

On 04/28/2012 09:27 PM, David Ostrovsky wrote:

With this ugly (work-in-progress) hack (needed only in gbuild-part) make
check command pass now on Ubuntu 11.10 (with default --as-needed linker
option)
I'm not sure, if this is the best place to do it.
Note:
I did it unconditionally: the production code would link with this
option too (still have to test it with clean build).
This is because the linking take place in smoketest/Library_smoketest.mk
with normal function:
$(eval $(call gb_Library_Library,smoketest)

Ideas on this?


Looks reasonable to me, pushed it now (adding more descriptive 
information into the commit message).


Thanks,
Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Re: make check problem in libtest_smoketest building master

2012-04-28 Thread David Ostrovsky

On 26.04.2012 15:04, Stephan Bergmann wrote:

[I accidentally sent this response to David only...]

 Original Message 
Subject: Re: make check problem in libtest_smoketest building master
Date: Thu, 26 Apr 2012 08:10:19 +0200
From: Stephan Bergmann 
To: David Ostrovsky 

On 04/25/2012 11:00 PM, David Ostrovsky wrote:
> Now we have a test, how do we solve the broken make check on Ubuntu 
anyway?

> I would prefer a small/quick hack in place to repaire the broken make
> check on Ubuntu.
> Then we have time to refactor the hack and make it the right way...

For a hack, wouldn't the easiest thing be to unconditionally sneak a
--no-as-needed into the relevant platforms' linker command lines in
solenv/gbuild/ and solenv/inc/?



With this ugly (work-in-progress) hack (needed only in gbuild-part) make 
check command pass now on Ubuntu 11.10 (with default --as-needed linker 
option)

I'm not sure, if this is the best place to do it.
Note:
I did it unconditionally: the production code would link with this 
option too (still have to test it with clean build).
This is because the linking take place in smoketest/Library_smoketest.mk 
with normal function:

$(eval $(call gb_Library_Library,smoketest)

Ideas on this?

David

PS: with this patch the full command is:

[ build LNK ] CppunitTest/libtest_smoketest.so
S=/home/david/projects/libreoffice-core/git/libo && 
O=$S/solver/unxlngx6.pro && W=$S/workdir/unxlngx6.pro &&   mkdir -p 
$W/LinkTarget/CppunitTest/ && /usr/bin/ccache g++ -shared 
-Wl,-z,noexecstack -Wl,-z,defs  -Wl,-rpath-link,/lib:/usr/lib 
-Wl,-z,combreloc -L$S/solenv/unxlngx6/lib -L$O/lib 
-L$S/solenv/unxlngx6/lib -L/usr/lib/x86_64-linux-gnu  
-Wl,--hash-style=gnu  -Wl,--dynamic-list-cpp-new 
-Wl,--dynamic-list-cpp-typeinfo -Wl,-Bsymbolic-functions 
-Wl,--start-group -Wl,--end-group -Wl,--no-as-needed  -lcppunit 
-lsmoketest -o $W/LinkTarget/CppunitTest/libtest_smoketest.so


>From a61ff76b56cd4fec60b624b867683db9f3e3d264 Mon Sep 17 00:00:00 2001
From: David Ostrovsky 
Date: Sat, 28 Apr 2012 20:57:54 +0200
Subject: [PATCH] add --not-as-needed linker option on unxgcc platform

Change-Id: I88fc79766ffb4a4ca8ead05bb9033c686120cf2c
---
 solenv/gbuild/platform/unxgcc.mk |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index d288d63..89665d6 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -213,6 +213,7 @@ $(call gb_Helper_abbreviate_dirs,\
 		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
 		$(foreach extraobjectlist,$(EXTRAOBJECTLISTS),`cat $(extraobjectlist)`) \
 		-Wl$(COMMA)--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) -Wl$(COMMA)--end-group \
+		-Wl$(COMMA)--no-as-needed \
 		$(LIBS) \
 		$(patsubst lib%.a,-l%,$(patsubst lib%.so,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib) \
 		-o $(if $(SOVERSION),$(1).$(SOVERSION),$(1)))
-- 
1.7.5.4

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-26 Thread Stephan Bergmann

[I accidentally sent this response to David only...]

 Original Message 
Subject: Re: make check problem in libtest_smoketest building master
Date: Thu, 26 Apr 2012 08:10:19 +0200
From: Stephan Bergmann 
To: David Ostrovsky 

On 04/25/2012 11:00 PM, David Ostrovsky wrote:
> Now we have a test, how do we solve the broken make check on Ubuntu 
anyway?

> I would prefer a small/quick hack in place to repaire the broken make
> check on Ubuntu.
> Then we have time to refactor the hack and make it the right way...

For a hack, wouldn't the easiest thing be to unconditionally sneak a
--no-as-needed into the relevant platforms' linker command lines in
solenv/gbuild/ and solenv/inc/?

Stephan

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-26 Thread Lubos Lunak
On Wednesday 25 of April 2012, David Ostrovsky wrote:
> On 13.04.2012 11:35, Noel Grandin wrote:
> > On 2012-04-12 14:40, Stephan Bergmann wrote:
> >> Insist on people compiling with an unbroken toolchain instead?
> >
> > It looks like Fedora is also going to do this:
> > http://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking
> >
> > I'm willing to write a configure test to add the --no-as-needed flag
> > if someone can point me in the right direction.
> > I can follow the configure.in syntax easily enough, but what would be
> > the easiest way to test for the fact that the linker is defaulting to
> > --as-needed?
>
> this is a tricky one, because ldd -r -u is not portalble.
> We could create a lib, link it to binary but without actually using
> something from that lib.

 That seems to be needlessly complex. If LO really can't build correctly 
with --as-needed and there are no intentions to fix that, it should be enough 
to just add --no-as-needed in the right place(s) to LDFLAGS, unconditionally 
(assuming the compiler/linker know this option, of course).

 That said, there are a number of distributions building that way (it's the 
default in openSUSE build service too AFAIK), so while 'everybody does that' 
is not an argument on its own, perhaps we should consider the possibility 
that it is not the toolchain that is broken.

-- 
 Lubos Lunak
 l.lu...@suse.cz
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-25 Thread David Ostrovsky

On 13.04.2012 11:35, Noel Grandin wrote:



On 2012-04-12 14:40, Stephan Bergmann wrote:

Insist on people compiling with an unbroken toolchain instead?



It looks like Fedora is also going to do this:
http://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking

I'm willing to write a configure test to add the --no-as-needed flag 
if someone can point me in the right direction.
I can follow the configure.in syntax easily enough, but what would be 
the easiest way to test for the fact that the linker is defaulting to 
--as-needed?



this is a tricky one, because ldd -r -u is not portalble.
We could create a lib, link it to binary but without actually using 
something from that lib.
On systems with linker defaulting to --as needed this dependency would 
be dropped. That why we could safely remove this lib and try to execute 
the binary.
If it is ok, then we are on system with linker defaulting to --as-needed 
and not otherwise.


Here is a quick test on Mac OS X (where ld even not aware of this option):

$ echo 'int foo(){return 42;}'> foo.c; gcc -o libfoo.so -shared foo.c
$ echo 'main(){return 42;}' > bar.c; gcc -o bar bar.c -L. -lfoo
$ ./bar; echo $?
42
$ rm libfoo.so; ./bar; echo $?
dyld: Library not loaded: libfoo.so

and here on Ubuntu with linker defaulting to --as-needed:

$ echo 'int foo(){return 42;}'> foo.c; gcc -o libfoo.so -shared foo.c
$ echo 'main(){return 42;}' > bar.c; gcc -o bar bar.c -L. -lfoo
$ ./bar; echo $?
42
$ rm libfoo.so; ./bar; echo $?
42
$ ldd -r -u bar
Unused direct dependencies:


Now we have a test, how do we solve the broken make check on Ubuntu anyway?
I would prefer a small/quick hack in place to repaire the broken make 
check on Ubuntu.

Then we have time to refactor the hack and make it the right way...

Or may be I'm wrong in my suggestion, that Ubuntu is the first class 
citizen OS to hack on LO?


Ciao
David

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-23 Thread Michael Stahl
On 23/04/12 09:49, Stephan Bergmann wrote:
> On 04/22/2012 10:51 PM, David Ostrovsky wrote:
>> your patch was still not pushed.
>>
>> So we have two options here:
>> 1. push your patch (I attached it with description ;-)
>> 2. use make interactive variable LDFLAGS, a lá make
>> LDFLAGS='-Wl,--no-as-needed' check
>>
>> Any ideas on this?
> 
> I still do not see why we need the two different libraries at all, 
> smoketest (from smoketest/Library_smoketest.mk) and smoketest_test (from 
> smoketest/CppunitTest_smoketest.mk), both containing the exact same 
> CppUnit test code.

me neither, but i guess shipping the thing produced by CppunitTest
currently doesn't work because the RPATH is wrong, and furthermore i
don't really get the point of shipping cppunittests anyway.

> If we want the feature of 
> 
>  
> 
> "create installation set for tests" and produce the CppUnit test code 
> library not only for direct consumption in the CppunitTest_*.mk 
> makefile, but also for inclusion in installation sets, then we should 
> probably make solenv/gbuild/CppunitTest.mk more flexible, so that 
> CppUnit test libraries need not necessarily built directly in their 
> CppunitTest_*.mk.

well i don't think complicating the gbuild core for this rather bizarre
special case is a good idea; if anything i'd first investigate whether
just changing the RPATH for Cppunittests and shipping the
Cppunit_smoketest instead of the ordinary Library_smoketest fixes things
up so everybody is happy?

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-23 Thread Stephan Bergmann

On 04/22/2012 10:51 PM, David Ostrovsky wrote:

your patch was still not pushed.

So we have two options here:
1. push your patch (I attached it with description ;-)
2. use make interactive variable LDFLAGS, a lá make
LDFLAGS='-Wl,--no-as-needed' check

Any ideas on this?


I still do not see why we need the two different libraries at all, 
smoketest (from smoketest/Library_smoketest.mk) and smoketest_test (from 
smoketest/CppunitTest_smoketest.mk), both containing the exact same 
CppUnit test code.


If we want the feature of 
 

"create installation set for tests" and produce the CppUnit test code 
library not only for direct consumption in the CppunitTest_*.mk 
makefile, but also for inclusion in installation sets, then we should 
probably make solenv/gbuild/CppunitTest.mk more flexible, so that 
CppUnit test libraries need not necessarily built directly in their 
CppunitTest_*.mk.


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-22 Thread David Ostrovsky

Hi Matúš,

your patch was still not pushed.

So we have two options here:
1. push your patch (I attached it with description ;-)
2. use make interactive variable LDFLAGS, a lá make 
LDFLAGS='-Wl,--no-as-needed' check


Any ideas on this?

Ciao
David

On 13.04.2012 12:40, Matúš Kukan wrote:

On 11 April 2012 14:24, Noel Grandin  wrote:

Building on Ubuntu 64-bit, "make check" is failing because of a missing
symbol in libtest_smoketest.so.
Doing a "make smoketest.clean" doesn't seem to help.
The library does genuinely seem to be missing the symbol (readelf log
attached).

Any ideas for tracking this down?

Does attached diff help ?
There is
-$(eval $(call gb_CppunitTest_use_libraries,smoketest,\
+$(eval $(call gb_CppunitTest_use_library_objects,smoketest,\

I did not know what commit message to write there.
If it helps feel free to push it anybody, please.

Best,
Matus


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


>From 9c521b5029d9b9ff4636f775fb99c8c5d279f331 Mon Sep 17 00:00:00 2001
From: David Ostrovsky 
Date: Sun, 22 Apr 2012 22:36:53 +0200
Subject: [PATCH] fix ld toolchain problem defaulting to --as-needed option on
 ubuntu 11.10

---
 smoketest/CppunitTest_smoketest.mk |   12 +++-
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/smoketest/CppunitTest_smoketest.mk b/smoketest/CppunitTest_smoketest.mk
index cbfc3d3..ce5625f 100644
--- a/smoketest/CppunitTest_smoketest.mk
+++ b/smoketest/CppunitTest_smoketest.mk
@@ -29,12 +29,14 @@ $(eval $(call gb_CppunitTest_CppunitTest,smoketest))
 
 $(eval $(call gb_CppunitTest_abort_on_assertion,smoketest))
 
-$(eval $(call gb_CppunitTest_use_api,smoketest,\
-	offapi \
-	udkapi \
-))
-
 $(eval $(call gb_CppunitTest_use_libraries,smoketest,\
+	cppu \
+	cppuhelper \
+	sal \
+	unotest \
+ ))
+
+$(eval $(call gb_CppunitTest_use_library_objects,smoketest,\
 	smoketest \
 ))
 
-- 
1.7.5.4

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-13 Thread Bjoern Michaelsen
On Fri, Apr 13, 2012 at 01:44:23PM +0200, David Ostrovsky wrote:
> Hi,
> 
> I'm running into the same issue:
> 
> 
> [ build RGM ] 
> CustomTarget/jurt/test/com/sun/star/lib/uno/protocols/urp/registry.rdb
> terminate called after throwing an instance of
> 'CppUnit::DynamicLibraryManagerException'
>   what():  Symbol [cppunitTestPlugIn] not found in dynamic 
> libary:/home/david/projects/libreoffice-core/git/libo/workdir/unxlngx6/LinkTarget/CppunitTest/libtest_smoketest.so
> Aborted
> 
> I am also on oneiric:
> 
> lsb_release -a
> No LSB modules are available.
> Distributor ID:Ubuntu
> Description:Ubuntu 11.10
> Release:11.10
> Codename:oneiric
> 
> David
> 

The patch is to either:
- add as-needed to the link flags
- reorder the library correctly

Best,

Bjoern
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-13 Thread Stephan Bergmann

On 04/13/2012 01:42 PM, Bjoern Michaelsen wrote:

On Fri, Apr 13, 2012 at 12:48:24PM +0200, Stephan Bergmann wrote:

I would still prefer to simply insist on Ubuntu fixing their tool
chain.


Well, Ubuntu (and I think Debian too) are defaulting to as-needed for:
- deps (which claims OpenSUSE doing the same)
   http://wiki.debian.org/ToolChain/DSOLinking#Only_link_with_needed_libraries
- IIRC gold linker also defaults to no-add-needed, so it is a good idea to move 
the
   application build systems to cope with that anyway.


Please do not confuse --as-needed and --add-needed (aka 
--copy-dt-needed-entries).  Having the latter disabled is the default 
anyway (for quite a while now, both ld and gold).


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-13 Thread David Ostrovsky

Hi,

I'm running into the same issue:


[ build RGM ] 
CustomTarget/jurt/test/com/sun/star/lib/uno/protocols/urp/registry.rdb
terminate called after throwing an instance of 
'CppUnit::DynamicLibraryManagerException'
  what():  Symbol [cppunitTestPlugIn] not found in dynamic 
libary:/home/david/projects/libreoffice-core/git/libo/workdir/unxlngx6/LinkTarget/CppunitTest/libtest_smoketest.so

Aborted

I am also on oneiric:

lsb_release -a
No LSB modules are available.
Distributor ID:Ubuntu
Description:Ubuntu 11.10
Release:11.10
Codename:oneiric

David

On 13.04.2012 12:57, Noel Grandin wrote:



On 2012-04-13 12:48, Stephan Bergmann wrote:


Noel, do you happen to be affected because you are on a pre-final 
natty release (whatever that is)?




I'm running 11.10 (Oneiric) which is the latest production release.

Disclaimer: http://www.peralex.com/disclaimer.html


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-13 Thread Bjoern Michaelsen
Hi,

On Fri, Apr 13, 2012 at 12:48:24PM +0200, Stephan Bergmann wrote:
> I would still prefer to simply insist on Ubuntu fixing their tool
> chain.

Well, Ubuntu (and I think Debian too) are defaulting to as-needed for:
- deps (which claims OpenSUSE doing the same)
  http://wiki.debian.org/ToolChain/DSOLinking#Only_link_with_needed_libraries
- IIRC gold linker also defaults to no-add-needed, so it is a good idea to move 
the
  application build systems to cope with that anyway.

> 
> "NOTE: The ld --as-needed default was reverted for the final natty
> release, and will be re-enabled in the o-series."  This at least
> seems to indicate that Ubuntu is aware their move is not without
> problems. Noel, do you happen to be affected because you are on a
> pre-final natty release (whatever that is)?

More likely to be an o-series (that is: Oneiric/Ubuntu 11.10).

> Björn, do you know anything about this Ubuntu-specific thing, or
> anyone within Ubuntu we could discuss that with?

CC'ing doko for this.

Best,

Bjoern
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-13 Thread Noel Grandin



On 2012-04-13 12:48, Stephan Bergmann wrote:


Noel, do you happen to be affected because you are on a pre-final 
natty release (whatever that is)?




I'm running 11.10 (Oneiric) which is the latest production release.

Disclaimer: http://www.peralex.com/disclaimer.html


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-13 Thread Stephan Bergmann

On 04/13/2012 11:35 AM, Noel Grandin wrote:

On 2012-04-12 14:40, Stephan Bergmann wrote:

Insist on people compiling with an unbroken toolchain instead?



It looks like Fedora is also going to do this:
http://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking


No, as already detailed by Michael.


I'm willing to write a configure test to add the --no-as-needed flag if
someone can point me in the right direction.
I can follow the configure.in syntax easily enough, but what would be
the easiest way to test for the fact that the linker is defaulting to
--as-needed?


I would still prefer to simply insist on Ubuntu fixing their tool chain. 

 
"NOTE: The ld --as-needed default was reverted for the final natty 
release, and will be re-enabled in the o-series."  This at least seems 
to indicate that Ubuntu is aware their move is not without problems. 
Noel, do you happen to be affected because you are on a pre-final natty 
release (whatever that is)?


Björn, do you know anything about this Ubuntu-specific thing, or anyone 
within Ubuntu we could discuss that with?


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-13 Thread Matúš Kukan
On 11 April 2012 14:24, Noel Grandin  wrote:
> Building on Ubuntu 64-bit, "make check" is failing because of a missing
> symbol in libtest_smoketest.so.
> Doing a "make smoketest.clean" doesn't seem to help.
> The library does genuinely seem to be missing the symbol (readelf log
> attached).
>
> Any ideas for tracking this down?

Does attached diff help ?
There is
-$(eval $(call gb_CppunitTest_use_libraries,smoketest,\
+$(eval $(call gb_CppunitTest_use_library_objects,smoketest,\

I did not know what commit message to write there.
If it helps feel free to push it anybody, please.

Best,
Matus


smoketest.diff
Description: Binary data
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-13 Thread Michael Stahl
On 13/04/12 11:35, Noel Grandin wrote:
> 
> 
> On 2012-04-12 14:40, Stephan Bergmann wrote:
>> Insist on people compiling with an unbroken toolchain instead?
>>
>>
> It looks like Fedora is also going to do this:
> http://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking

this is a different change: ChangeInImplicitDSOLinking is about not
adding DT_NEEDED entries for libraries that are _not_ explicitly passed
on the ld command line, while the problematic --as-needed is about not
adding DT_NEEDED entries for libraries that _are_ explicitly passed on
the ld command line but from which no symbol is imported.

besides, the page says ChangeInImplicitDSOLinking is live since Fedora13

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-13 Thread Noel Grandin



On 2012-04-12 14:40, Stephan Bergmann wrote:

Insist on people compiling with an unbroken toolchain instead?



It looks like Fedora is also going to do this:
http://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking

I'm willing to write a configure test to add the --no-as-needed flag if 
someone can point me in the right direction.
I can follow the configure.in syntax easily enough, but what would be 
the easiest way to test for the fact that the linker is defaulting to 
--as-needed?


Thanks, Noel Grandin



Disclaimer: http://www.peralex.com/disclaimer.html


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-12 Thread Stephan Bergmann

On 04/12/2012 12:40 PM, Michael Stahl wrote:

wonder what we should do about ld that defaults to --as-needed...


Insist on people compiling with an unbroken toolchain instead?

For the smoketest problem at hand, the best thing would probably be to 
get rid of the broken test_smoketest vs. smoketest library design, anyway.


But there are other places where we imply --no-as-needed:  Libraries 
within extensions are guaranteed to be run in an environment where all 
the public URE libraries are available.  The way we ensure that is by 
explicitly linking the relevant executables against all the relevant URE 
libraries.  (At least that's how we used to do it; might well got broken 
with some gbuild'ification, and is typically hard to detect, given that 
most if not all public URE libraries get loaded into a process through 
one way or another, anyway.)


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-12 Thread d . ostrovsky

Zitat von Michael Stahl :


On 12/04/12 12:32, Noel Grandin wrote:



On 2012-04-12 11:51, Stephan Bergmann wrote:

What is the output of

readelf -d
workdir/unxlngx6.pro/LinkTarget/CppunitTest/libtest_smoketest.so

for you?


Output attached.



 0x0001 (NEEDED) Shared library: [libc.so.6]


yeah, that's rather too little :(

this is missing here:


 0x0001 (NEEDED) Shared library: [libsmoketest.so]


indeed looks like your ld defaults to --as-needed.

it should work if you do this:

cd smoketest && make -r clean && make -r LDFLAGS=-Wl,--no-as-needed
subsequentcheck



As it's stated here [1]

*Caution:* Reading the documentation, you may be tempted to try the  
--no-as-needed option as a "quick fix" workaround, but it's generally  
the not the right fix. If you aren't able to get a package working  
with the --as-needed and --no-copy-dt-needed-entries options enabled,  
it's best to submit a bug report and get expert attention. (It may be  
a sign of deeper flaws in the code or linking strategy of the package.)


[1] https://wiki.ubuntu.com/NattyNarwhal/ToolchainTransition


wonder what we should do about ld that defaults to --as-needed...

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice



David

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-12 Thread Noel Grandin



On 2012-04-12 12:40, Michael Stahl wrote:
it should work if you do this: cd smoketest && make -r clean && make 
-r LDFLAGS=-Wl,--no-as-needed subsequentcheck


Indeed that works (not entirely, but at least it gets past the symbol 
loading issue).


Disclaimer: http://www.peralex.com/disclaimer.html


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-12 Thread Noel Grandin



On 2012-04-12 11:56, Stephan Bergmann wrote:
Sounds plausible.  Just asked Noel for readelf -d output for 
verification.  I would consider an ld that assumes --as-needed per 
default as broken.





For whatever reason, Ubuntu appears to do that now:
https://wiki.ubuntu.com/NattyNarwhal/ToolchainTransition


Disclaimer: http://www.peralex.com/disclaimer.html


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-12 Thread Michael Stahl
On 12/04/12 12:32, Noel Grandin wrote:
> 
> 
> On 2012-04-12 11:51, Stephan Bergmann wrote:
>> What is the output of
>>
>> readelf -d 
>> workdir/unxlngx6.pro/LinkTarget/CppunitTest/libtest_smoketest.so
>>
>> for you?
>>
> Output attached.

>  0x0001 (NEEDED) Shared library: [libc.so.6]

yeah, that's rather too little :(

this is missing here:

>  0x0001 (NEEDED) Shared library: [libsmoketest.so]

indeed looks like your ld defaults to --as-needed.

it should work if you do this:

cd smoketest && make -r clean && make -r LDFLAGS=-Wl,--no-as-needed
subsequentcheck

wonder what we should do about ld that defaults to --as-needed...

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-12 Thread Noel Grandin



On 2012-04-12 11:51, Stephan Bergmann wrote:

What is the output of

readelf -d 
workdir/unxlngx6.pro/LinkTarget/CppunitTest/libtest_smoketest.so


for you?


Output attached.



Disclaimer: http://www.peralex.com/disclaimer.html


noel@ubuntu:~/libo$ readelf -d 
workdir/unxlngx6.pro/LinkTarget/CppunitTest/libtest_smoketest.so

Dynamic section at offset 0xe20 contains 22 entries:
  TagType Name/Value
 0x0003 (PLTGOT) 0x1fe8
 0x0002 (PLTRELSZ)   24 (bytes)
 0x0017 (JMPREL) 0x4a8
 0x0014 (PLTREL) RELA
 0x0007 (RELA)   0x448
 0x0008 (RELASZ) 96 (bytes)
 0x0009 (RELAENT)24 (bytes)
 0x6ff9 (RELACOUNT)  1
 0x0006 (SYMTAB) 0x228
 0x000b (SYMENT) 24 (bytes)
 0x0005 (STRTAB) 0x300
 0x000a (STRSZ)  190 (bytes)
 0x6ef5 (GNU_HASH)   0x3c0
 0x0001 (NEEDED) Shared library: [libc.so.6]
 0x000c (INIT)   0x4c0
 0x000d (FINI)   0x608
 0x6ff0 (VERSYM) 0x3f8
 0x6ffc (VERDEF) 0x40c
 0x6ffd (VERDEFNUM)  1
 0x6ffe (VERNEED)0x428
 0x6fff (VERNEEDNUM) 1
 0x (NULL)   0x0
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-12 Thread Stephan Bergmann

On 04/12/2012 10:48 AM, Noel Grandin wrote:

Output attached.

[...]

 10709: symbol=dlsym;  lookup in file=/lib/x86_64-linux-gnu/libdl.so.2 
[0]
 10709: symbol=cppunitTestPlugIn;  lookup in 
file=/home/noel/libo/workdir/unxlngx6.pro/LinkTarget/CppunitTest/libtest_smoketest.so
 [0]
 10709: symbol=cppunitTestPlugIn;  lookup in 
file=/lib/x86_64-linux-gnu/libc.so.6 [0]
 10709: symbol=cppunitTestPlugIn;  lookup in 
file=/lib64/ld-linux-x86-64.so.2 [0]
 10709: 
/home/noel/libo/workdir/unxlngx6.pro/LinkTarget/CppunitTest/libtest_smoketest.so:
 error: symbol lookup error: undefined symbol: cppunitTestPlugIn (fatal)


My output (Fedora 16) there is


  4333: symbol=dlsym;  lookup in file=/lib64/libdl.so.2 [0]
  4333: symbol=cppunitTestPlugIn;  lookup in 
file=/data/lo/core/workdir/unxlngx6/LinkTarget/CppunitTest/libtest_smoketest.so 
[0]
  4333: symbol=cppunitTestPlugIn;  lookup in 
file=/data/lo/core/solver/unxlngx6/lib/libcppunit-1.12.so.1 [0]
  4333: symbol=cppunitTestPlugIn;  lookup in 
file=/data/lo/core/solver/unxlngx6/lib/libsmoketest.so [0]


What is the output of

readelf -d workdir/unxlngx6.pro/LinkTarget/CppunitTest/libtest_smoketest.so

for you?

Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-12 Thread Stephan Bergmann

On 04/12/2012 11:05 AM, Petr Mladek wrote:

Stephan Bergmann píše v St 11. 04. 2012 v 16:29 +0200:

Looks like the dynamic loader on your system does not support dlsym to
report a symbol not exported by the lib itself, but only indirectly by a
lib the first lib links against.


I wonder if it might be related to --as-needed linker option. It caused
similar troubles when enabled on openSUSE linker by default.


Sounds plausible.  Just asked Noel for readelf -d output for 
verification.  I would consider an ld that assumes --as-needed per 
default as broken.


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-12 Thread Petr Mladek
Stephan Bergmann píše v St 11. 04. 2012 v 16:29 +0200:
> On 04/11/2012 02:24 PM, Noel Grandin wrote:
> > Building on Ubuntu 64-bit, "make check" is failing because of a missing
> > symbol in libtest_smoketest.so.
> > Doing a "make smoketest.clean" doesn't seem to help.
> > The library does genuinely seem to be missing the symbol (readelf log
> > attached).
> 
> In the case of smoketest, the lib containing cppunitTestPlugIn is not 
> libtest_smoketest.so but libsmoketest.so (where the former links
> against the latter).  The reason for that appears to be 
> 
>  
> "create installation set for tests."  (Petr, does that feature still 
> work, after gbuild'ification of smoketest?)

I haven't tested it after gbuild'fication. I do not work much with
master this time :-(

> Looks like the dynamic loader on your system does not support dlsym to 
> report a symbol not exported by the lib itself, but only indirectly by a 
> lib the first lib links against.

I wonder if it might be related to --as-needed linker option. It caused
similar troubles when enabled on openSUSE linker by default.

Of course, it is more likely broken by gbuild'ification. I wonder if 
Matúš could have a look at it.


Best Regards,
Petr

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-12 Thread Stephan Bergmann

On 04/12/2012 10:30 AM, Noel Grandin wrote:



On 2012-04-12 10:22, Stephan Bergmann wrote:


Please find out whether the assumption is correct (see Lubos' mail on
LD_DEBUG).


I tried

LD_DEBUG=symbols make check

but it produced so much output it seems to have broken the build - it
eventually froze up during a link step.

How do I run just the failing test?


cd smoketest && make -n 
/home/noel/libo/workdir/unxlngx6.pro/CppunitTest/smoketest.test


will display the command line to run the test (following a line "[ build 
CUT ] smoketest"), starting with "S=... && O=... && W=... && mkdir -p 
... && (LD_LIBRARY_PATH=...".  Copy that mumbo-jumbo, stick 
"LD_DEBUG=symbols " between "(" and "LD_LIBRARY_PATH=" and run that. 
The output will be captured in 
/home/noel/libo/workdir/unxlngx6.pro/CppunitTest/smoketest.test.log.


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-12 Thread Noel Grandin



On 2012-04-12 10:22, Stephan Bergmann wrote:


Please find out whether the assumption is correct (see Lubos' mail on 
LD_DEBUG).



I tried

LD_DEBUG=symbols make check

but it produced so much output it seems to have broken the build - it 
eventually froze up during a link step.

How do I run just the failing test?



Disclaimer: http://www.peralex.com/disclaimer.html


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-12 Thread Stephan Bergmann

On 04/12/2012 09:49 AM, Noel Grandin wrote:

On 2012-04-11 16:29, Stephan Bergmann wrote:

Looks like the dynamic loader on your system does not support dlsym to
report a symbol not exported by the lib itself, but only indirectly by
a lib the first lib links against.



Darn, I would have thought that by now pretty much all Linux's had the
same dynamic loader.


Please find out whether the assumption is correct (see Lubos' mail on 
LD_DEBUG).


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-12 Thread Noel Grandin



On 2012-04-11 16:29, Stephan Bergmann wrote:
Looks like the dynamic loader on your system does not support dlsym to 
report a symbol not exported by the lib itself, but only indirectly by 
a lib the first lib links against.



Darn, I would have thought that by now pretty much all Linux's had the 
same dynamic loader.

Is there a linker option that would cure this?
Something like
  --export-dynamic
  --export-all-symbols
And where would I try inserting these?

Thanks, Noel Grandin


Disclaimer: http://www.peralex.com/disclaimer.html


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-11 Thread Lubos Lunak
On Wednesday 11 of April 2012, Stephan Bergmann wrote:
> On 04/11/2012 02:24 PM, Noel Grandin wrote:
> > Building on Ubuntu 64-bit, "make check" is failing because of a missing
> > symbol in libtest_smoketest.so.
> > Doing a "make smoketest.clean" doesn't seem to help.
> > The library does genuinely seem to be missing the symbol (readelf log
> > attached).
>
> In the case of smoketest, the lib containing cppunitTestPlugIn is not
> libtest_smoketest.so but libsmoketest.so (where the former links
> against the latter).  The reason for that appears to be
> 0ba290b32732a1fd70130e> "create installation set for tests."  (Petr, does
> that feature still work, after gbuild'ification of smoketest?)
>
> Looks like the dynamic loader on your system does not support dlsym to
> report a symbol not exported by the lib itself, but only indirectly by a
> lib the first lib links against.

 Note that you can check what the dynamic loader does by doing 
LD_DEBUG=symbols command (see LD_DEBUG=help /bin/true).

-- 
 Lubos Lunak
 l.lu...@suse.cz
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: make check problem in libtest_smoketest building master

2012-04-11 Thread Stephan Bergmann

On 04/11/2012 02:24 PM, Noel Grandin wrote:

Building on Ubuntu 64-bit, "make check" is failing because of a missing
symbol in libtest_smoketest.so.
Doing a "make smoketest.clean" doesn't seem to help.
The library does genuinely seem to be missing the symbol (readelf log
attached).


In the case of smoketest, the lib containing cppunitTestPlugIn is not 
libtest_smoketest.so but libsmoketest.so (where the former links
against the latter).  The reason for that appears to be 
 
"create installation set for tests."  (Petr, does that feature still 
work, after gbuild'ification of smoketest?)


Looks like the dynamic loader on your system does not support dlsym to 
report a symbol not exported by the lib itself, but only indirectly by a 
lib the first lib links against.


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice