You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Andrew Rist <an...@oracle.com> on 2012/02/28 19:57:50 UTC

[BUILD] error when building on Ubuntu 12.04 (alpha)

I am trying to sort out the build on Ubuntu 12.04 and other than 
packaging I have a single issue.  (I'm using build --all --html -P4 -- 
-P4 , so many packages are built after the initial failure is reached)

In addition to exact causes, I'm also looking for how people are 
debugging (running cmds in isolation, from memory ("I saw something like 
that once"), by Google, etc.)  Thus, I'm trying to use this thread both 
to solve this problem, but to also leave a trail for others hitting the 
same or similar issues.

In the build, binfilters compiles until there are 3 modules left, and 
fails on filter/source/bf_offwrp with the following error:

    m -f ../../../unxlngi6.pro/lib/check_libbf_wrapper.so
    mv ../../../unxlngi6.pro/lib/libbf_wrapper.so
    ../../../unxlngi6.pro/lib/check_libbf_wrapper.so
    /home/arist/apache/ooo/main/solenv/bin/checkdll.sh
    -L../../../unxlngi6.pro/lib
    -L/home/arist/apache/ooo/main/solver/340/unxlngi6.pro/lib 
    ../../../unxlngi6.pro/lib/check_libbf_wrapper.so
    : &&    
    LD_LIBRARY_PATH=/home/arist/apache/ooo/main/solver/340/unxlngi6.pro/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
    /home/arist/apache/ooo/main/solver/340/unxlngi6.pro/bin/xsltproc
    --nonet --stringparam uri \
            
    'vnd.sun.star.expand:$OOO_BASE_DIR/program/libbf_wrapper.so' -o
    ../../../unxlngi6.pro/misc/bf_wrapper.component \
             /home/arist/apache/ooo/main/solenv/bin/createcomponent.xslt
    bf_wrapper.component
    Making:    libbf_wrapper.so
    Making:    all_bf_wrapper.dpslo
    g++ -Wl,-z,combreloc -Wl,-z,defs -Wl,-Bsymbolic-functions
    -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo
    -Wl,--hash-style=both -Wl,-rpath,'$ORIGIN:$ORIGIN/../ure-link/lib'
    -shared -L../../../unxlngi6.pro/lib -L../lib
    -L/home/arist/apache/ooo/main/solenv/unxlngi6/lib
    -L/home/arist/apache/ooo/main/solver/340/unxlngi6.pro/lib
    -L/home/arist/apache/ooo/main/solenv/unxlngi6/lib
    -L/usr/lib/jvm/java-6-openjdk/lib
    -L/usr/lib/jvm/java-6-openjdk/jre/lib/i386
    -L/usr/lib/jvm/java-6-openjdk/jre/lib/i386/client
    -L/usr/lib/jvm/java-6-openjdk/jre/lib/i386/native_threads
    -L/usr/lib/i386-linux-gnu ../../../unxlngi6.pro/slo/bf_wrapper.o
    ../../../unxlngi6.pro/slo/bf_wrapper_version.o -o
    ../../../unxlngi6.pro/lib/libbf_wrapper.so -lbf_so -lbf_svt -lbf_ofa
    -lvcl -lsot -luno_sal -ltl -luno_cppu -luno_cppuhelpergcc3 -lbf_ysch
    -lbf_ysm -lbf_swlib -lbf_sdlib -lbf_sclib -lbf_svx -lutl
    -lcomphelpgcc3 -llegacy_binfilters -Wl,--as-needed -ldl -lpthread
    -lm -Wl,--no-as-needed -Wl,-Bdynamic -lstlport_gcc
    ../../../unxlngi6.pro/lib/libbf_sdlib.a(sd_sdlib.o): In function
    `binfilter::SdDrawDocShell::RegisterFactory(unsigned short)':
    sd_sdlib.cxx:(.text+0x429): undefined reference to
    `binfilter::SvFactory::Register()'
    ../../../unxlngi6.pro/lib/libbf_sdlib.a(sd_sdlib.o): In function
    `binfilter::SdGraphicDocShell::RegisterFactory(unsigned short)':
    sd_sdlib.cxx:(.text+0x141b): undefined reference to
    `binfilter::SvFactory::Register()'
    ../../../unxlngi6.pro/lib/libbf_ysch.a(sch_schlib.o): In function
    `binfilter::SchChartDocShell::RegisterFactory(unsigned short)':
    sch_schlib.cxx:(.text+0x41f): undefined reference to
    `binfilter::SvFactory::Register()'
    ../../../unxlngi6.pro/lib/libbf_ysm.a(starmath_smlib.o): In function
    `binfilter::SmDocShell::RegisterFactory(unsigned short)':
    starmath_smlib.cxx:(.text+0x6cf): undefined reference to
    `binfilter::SvFactory::Register()'
    ../../../unxlngi6.pro/lib/libbf_swlib.a(sw_swlib.o): In function
    `binfilter::SwIoSystem::IsValidStgFilter(binfilter::SvStorage&,
    binfilter::SfxFilter const&)':
    sw_swlib.cxx:(.text+0x3f7): undefined reference to
    `binfilter::SvStorage::OpenSotStream(String const&, unsigned short,
    short)'
    ../../../unxlngi6.pro/lib/libbf_swlib.a(sw_swlib.o): In function
    `binfilter::SwDocShell::RegisterFactory(unsigned short)':
    sw_swlib.cxx:(.text+0xd9d): undefined reference to
    `binfilter::SvFactory::Register()'
    ../../../unxlngi6.pro/lib/libbf_swlib.a(sw_swlib.o): In function
    `binfilter::SwIoSystem::GetFileFilter(String const&, String const&,
    binfilter::SfxMedium*)':
    sw_swlib.cxx:(.text+0x13de): undefined reference to
    `binfilter::SvStorage::IsStorageFile(String const&)'
    sw_swlib.cxx:(.text+0x1431): undefined reference to
    `binfilter::SvStorage::SvStorage(String const&, unsigned short, short)'
    ../../../unxlngi6.pro/lib/libbf_swlib.a(sw_swlib.o): In function
    `binfilter::SwWebDocShell::RegisterFactory(unsigned short)':
    sw_swlib.cxx:(.text+0x1969): undefined reference to
    `binfilter::SvFactory::Register()'
    ../../../unxlngi6.pro/lib/libbf_swlib.a(sw_swlib.o): In function
    `binfilter::SwGlobalDocShell::RegisterFactory(unsigned short)':
    sw_swlib.cxx:(.text+0x1bd9): undefined reference to
    `binfilter::SvFactory::Register()'
    ../../../unxlngi6.pro/lib/libbf_sclib.a(sc_sclib.o): In function
    `binfilter::ScDocShell::RegisterFactory(unsigned short)':
    sc_sclib.cxx:(.text+0x409): undefined reference to
    `binfilter::SvFactory::Register()'
    collect2: ld returned 1 exit status
    dmake:  Error code 1, while making
    '../../../unxlngi6.pro/lib/libbf_wrapper.so'

some additional info from config:

    checking the GNU gcc compiler version... checked (gcc 4.6)
    checking the installed JDK... checked (JDK 1.6.0_24)
    checking the GNU make version... make 3.81
    checking the GNU C++ compiler version... checked (g++ 4.6)
    checking for g++ include path... /usr/include/c++/4.6
    checking epm version... OK, >= 3.7
    checking whether libc is >= 2.1.1... yes

as always...  thanks in advance for the help.

Re: [BUILD] error when building on Ubuntu 12.04 (alpha)

Posted by Herbert Duerr <hd...@apache.org>.
> $ sudo ln -s /usr/bin/ld.gold
>[...]
> And the libbf_wrapper.so is properly generated...

That's great!

> Question:
> Do we just search until we get a combination of gcc and make and ld that
> work on a platform?

A good question. Our project is a heavy stress test for the whole tool 
chain and in an ideal world we'd track down every problem and solve it. 
In practice a combination that works after some little bit of tweaking 
dampens the "itch to scratch" motivation somewhat.

> or
> Do we have preferred versions (e.g. default version on each platform)?

On Windows it is still MSVC2008, on OSX it is XCode3's gcc4.0, but on 
Linux anything recent is supposed to work.

Another interesting fact is, that the big warning-as-errors cleanup 
targeted gcc4.2, but as newer major versions understand the code flow 
better they provide better warnings. I agree with Pedro that we should 
look into llvm/clang in the future.

Of course there are known errors with some versions, e.g. 
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50255 or the problem we saw 
recently with gcc4.6 having some issues with STL in our bridges code. 
The former can be solved by upgrading gcc, the latter could be solved by 
making our code cleaner. Yet again it shows that using newer tools and 
attacking the problems that appear either improve the platform or our 
code base.

Herbert

Re: [BUILD] error when building on Ubuntu 12.04 (alpha)

Posted by Andrew Rist <an...@oracle.com>.

On 2/28/2012 11:30 AM, Herbert Duerr wrote:
> On 02/28/2012 07:57 PM, Andrew Rist wrote:
>> I am trying to sort out the build on Ubuntu 12.04 and other than
>> packaging I have a single issue. (I'm using build --all --html -P4 --
>> -P4 , so many packages are built after the initial failure is reached)
>>
>> In addition to exact causes, I'm also looking for how people are
>> debugging (running cmds in isolation, from memory ("I saw something like
>> that once"), by Google, etc.) Thus, I'm trying to use this thread both
>> to solve this problem, but to also leave a trail for others hitting the
>> same or similar issues.
>
> I remember seeing similar problems with missing symbols once and 
> switching linkers helped. Please run
>   ls -l /usr/bin/ld*
> and you'll see ld.gold, ld.bfd and ld, the latter one being a softlink 
> to probably ld.gold. Switching this soft link to point to ld.bfd could 
> help. It is older and slower, but still more reliable
>
> Herbert
interesting...
here's what I get:

    $ cd ooo/main
    $ . ./LinuxX86Env.Set.sh
    $ ls -l /usr/bin/ld*
    lrwxrwxrwx 1 root root       6 Feb 23 14:27 /usr/bin/ld -> ld.bfd
    -rwxr-xr-x 1 root root  827396 Jan 25 03:11 /usr/bin/ld.bfd
    -rwxr-xr-x 1 root root    5266 Feb 23 22:43 /usr/bin/ldd
    -rwxr-xr-x 1 root root 1804464 Jan 25 03:11 /usr/bin/ld.gold
    $ sudo rm /usr/bin/ld
    $ sudo ln -s  /usr/bin/ld.gold
    /usr/bin/ldarist@Ubu12:~/apache/ooo/main$ cd
    binfilter/filter/source/bf_offwrp/
    $ g++ -Wl,-z,combreloc -Wl,-z,defs -Wl,-Bsymbolic-functions
    -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo
    -Wl,--hash-style=both -Wl,-rpath,'$ORIGIN:$ORIGIN/../ure-link/lib'
    -shared -L../../../unxlngi6.pro/lib -L../lib
    -L/home/arist/apache/ooo/main/solenv/unxlngi6/lib
    -L/home/arist/apache/ooo/main/solver/340/unxlngi6.pro/lib
    -L/home/arist/apache/ooo/main/solenv/unxlngi6/lib
    -L/usr/lib/jvm/java-6-openjdk/lib
    -L/usr/lib/jvm/java-6-openjdk/jre/lib/i386
    -L/usr/lib/jvm/java-6-openjdk/jre/lib/i386/client
    -L/usr/lib/jvm/java-6-openjdk/jre/lib/i386/native_threads
    -L/usr/lib/i386-linux-gnu ../../../unxlngi6.pro/slo/bf_wrapper.o
    ../../../unxlngi6.pro/slo/bf_wrapper_version.o -o
    ../../../unxlngi6.pro/lib/libbf_wrapper.so -lbf_so -lbf_svt -lbf_ofa
    -lvcl -lsot -luno_sal -ltl -luno_cppu -luno_cppuhelpergcc3 -lbf_ysch
    -lbf_ysm -lbf_swlib -lbf_sdlib -lbf_sclib -lbf_svx -lutl
    -lcomphelpgcc3 -llegacy_binfilters -Wl,--as-needed -ldl -lpthread
    -lm -Wl,--no-as-needed -Wl,-Bdynamic -lstlport_gcc
    $ ls ../../../unxlngi6.pro/lib/
    bf_sclib.dump  libbf_ofa.so   libbf_sm.so       libbf_ysch.a
    bf_sclib.lib   libbf_sb.so    libbf_so.so       libbf_ysm.a
    bf_sdlib.dump  libbf_sch.so   libbf_svt.so      libbindet.so
    bf_sdlib.lib   libbf_sclib.a  libbf_svx.so      liblegacy_binfilters.so
    bf_swlib.dump  libbf_sc.so    libbf_swlib.a     xmloff_core.dump
    bf_swlib.lib   libbf_sdlib.a  libbf_sw.so       xmloff_core.lib
    libbf_frm.so   libbf_sd.so    libbf_wrapper.so  xmloff_xmlkywd.dump
    libbf_go.so    libbf_sfx.a    libbf_xo.so       xmloff_xmlkywd.lib


And the libbf_wrapper.so is properly generated...

Question:
Do we just search until we get a combination of gcc and make and ld that 
work on a platform?
or
Do we have preferred versions (e.g. default version on each platform)?

A.







Re: [BUILD] error when building on Ubuntu 12.04 (alpha)

Posted by Herbert Duerr <hd...@apache.org>.
On 02/28/2012 07:57 PM, Andrew Rist wrote:
> I am trying to sort out the build on Ubuntu 12.04 and other than
> packaging I have a single issue. (I'm using build --all --html -P4 --
> -P4 , so many packages are built after the initial failure is reached)
>
> In addition to exact causes, I'm also looking for how people are
> debugging (running cmds in isolation, from memory ("I saw something like
> that once"), by Google, etc.) Thus, I'm trying to use this thread both
> to solve this problem, but to also leave a trail for others hitting the
> same or similar issues.

I remember seeing similar problems with missing symbols once and 
switching linkers helped. Please run
   ls -l /usr/bin/ld*
and you'll see ld.gold, ld.bfd and ld, the latter one being a softlink 
to probably ld.gold. Switching this soft link to point to ld.bfd could 
help. It is older and slower, but still more reliable

Herbert