[Bug 372] New: reporting does not build anymore

For more information about this bug, visit
A new bug was added:
Summary: reporting does not build anymore
Product: OCL
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: blocker
Priority: P2
Component: Other
AssignedTo: orocos-dev [..] ...
ReportedBy: ruben [dot] smits [..] ...

I get the following linking error when compiling the latest ocl with the latest
rtt:

Linking CXX shared library liborocos-reporting.so
CMakeFiles/orocos-reporting.dir/FileReporting.o: In function
`__static_initialization_and_destruction_0(int, int)':
FileReporting.cpp:(.text+0xda): undefined reference to
`OCL::ComponentFactories::Factories'
/usr/bin/ld: CMakeFiles/orocos-reporting.dir/FileReporting.o: relocation
R_X86_64_PC32 against `OCL::ComponentFactories::Factories' can not be used when
making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[2]: *** [reporting/liborocos-reporting.so] Error 1

Ruben

[Bug 372] reporting does not build anymore

For more information about this bug, visit

peter [dot] soetens [..] ... changed:

What |Removed |Added
---------------------------------------------------------------------------
Resolution| |FIXED
Status|NEW |RESOLVED

------- Comment #9 from peter [dot] soetens [..] ... 2007-04-18 10:00

$ svn diff
Index: ComponentLoader.hpp
===================================================================

Ruben Smits's picture

[Bug 372] reporting does not build anymore

For more information about this bug, visit
A comment was added:
------- Comment #8 from ruben [dot] smits [..] ... 2007-04-18 10:00

(In reply to comment #7)
> (In reply to comment #5)
> > Linking CXX executable report
> > cd /src/ocl/build-gnulinux/reporting/tests && /usr/bin/cmake -P
> > CMakeFiles/report.dir/cmake_clean_target.cmake
> > cd /src/ocl/build-gnulinux/reporting/tests && /usr/bin/c++ -O2 -DNDEBUG
> > -fPIC "CMakeFiles/report.dir/main.o" -o report -rdynamic -L/usr/lib/ltilib
> > -L/src/ocl/build-gnulinux/reporting -L/src/ocl/build-gnulinux/taskbrowser
> > -L/install/build-gnulinux/lib -lorocos-taskbrowser -lorocos-reporting
> > -lorocos-rtt -lncurses -lreadline
> > -Wl,-rpath,/usr/lib/ltilib:/src/ocl/build-gnulinux/reporting:/src/ocl/build-gnulinux/taskbrowser:/install/build-gnulinux/lib
> > /src/ocl/build-gnulinux/reporting/liborocos-reporting.so: undefined reference
> > to `OCL::ComponentFactories::Factories'
> > collect2: ld returned 1 exit status
>
> This is a different error than the initial report.

Both errors complain about an undefined reference to
OCL::ComponentFactories::Factories', so i don't think they are very different.

> But anyway. I'll need the
> output of 'cmake ..' and your compiler version.
$ g++ --version
g++ (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)

$ cmake ..
Orocos Components version 0.2.1
Build type set to 'OCL' by user.

[Bug 372] reporting does not build anymore

For more information about this bug, visit
A comment was added:
------- Comment #7 from peter [dot] soetens [..] ... 2007-04-18 09:35

(In reply to comment #5)
> Linking CXX executable report
> cd /src/ocl/build-gnulinux/reporting/tests && /usr/bin/cmake -P
> CMakeFiles/report.dir/cmake_clean_target.cmake
> cd /src/ocl/build-gnulinux/reporting/tests && /usr/bin/c++ -O2 -DNDEBUG
> -fPIC "CMakeFiles/report.dir/main.o" -o report -rdynamic -L/usr/lib/ltilib
> -L/src/ocl/build-gnulinux/reporting -L/src/ocl/build-gnulinux/taskbrowser
> -L/install/build-gnulinux/lib -lorocos-taskbrowser -lorocos-reporting
> -lorocos-rtt -lncurses -lreadline
> -Wl,-rpath,/usr/lib/ltilib:/src/ocl/build-gnulinux/reporting:/src/ocl/build-gnulinux/taskbrowser:/install/build-gnulinux/lib
> /src/ocl/build-gnulinux/reporting/liborocos-reporting.so: undefined reference
> to `OCL::ComponentFactories::Factories'
> collect2: ld returned 1 exit status

This is a different error than the initial report. But anyway. I'll need the
output of 'cmake ..' and your compiler version.

Peter

Ruben Smits's picture

[Bug 372] reporting does not build anymore

For more information about this bug, visit
A comment was added:
------- Comment #6 from ruben [dot] smits [..] ... 2007-04-18 08:52

Since when do we need the deployment-component for reporting:

Linking CXX shared library liborocos-reporting.so
CMakeFiles/orocos-reporting.dir/FileReporting.o: In function
`__static_initialization_and_destruction_0(int, int)':
FileReporting.cpp:(.text+0xda): undefined reference to
`OCL::ComponentFactories::Factories'

using grep i find:

$ grep -R OCL::ComponentFactories::Factories *

deployment/ComponentLoader.hpp: OCL::FactoryMap*
OCL::ComponentFactories::Factories = 0; \
deployment/ComponentLoader.cpp: FactoryMap*
OCL::ComponentFactories::Factories = 0;

Why does reporting need the deployment?

Ruben

wmeeusse's picture

[Bug 372] reporting does not build anymore

For more information about this bug, visit
A comment was added:
------- Comment #5 from wim [dot] meeussen [..] ... 2007-04-18 08:31

> > $ make VERGBOSE=9

> Is this a joke ? just VERBOSE=1 will do.

I wat just trying to make sure you wouldn't reply with "can you also try
VERBOSE=2", and then "can you also try VERBOSE=3", etc :-)

This is the output you really asked for (with VERBOSE instead of VERGBOSE):

Linking CXX executable report
cd /src/ocl/build-gnulinux/reporting/tests && /usr/bin/cmake -P
CMakeFiles/report.dir/cmake_clean_target.cmake
cd /src/ocl/build-gnulinux/reporting/tests && /usr/bin/c++ -O2 -DNDEBUG
-fPIC "CMakeFiles/report.dir/main.o" -o report -rdynamic -L/usr/lib/ltilib
-L/src/ocl/build-gnulinux/reporting -L/src/ocl/build-gnulinux/taskbrowser
-L/install/build-gnulinux/lib -lorocos-taskbrowser -lorocos-reporting
-lorocos-rtt -lncurses -lreadline
-Wl,-rpath,/usr/lib/ltilib:/src/ocl/build-gnulinux/reporting:/src/ocl/build-gnulinux/taskbrowser:/install/build-gnulinux/lib
/src/ocl/build-gnulinux/reporting/liborocos-reporting.so: undefined reference
to `OCL::ComponentFactories::Factories'
collect2: ld returned 1 exit status
make[2]: *** [reporting/tests/report] Error 1
make[2]: Leaving directory `/src/ocl/build-gnulinux'
make[1]: *** [reporting/tests/CMakeFiles/report.dir/all] Error 2
make[1]: Leaving directory `/src/ocl/build-gnulinux'
make: *** [all] Error 2

[Bug 372] reporting does not build anymore

For more information about this bug, visit
A comment was added:
------- Comment #4 from peter [dot] soetens [..] ... 2007-04-17 15:50

(In reply to comment #3)
> $ make VERGBOSE=9

Is this a joke ? just VERBOSE=1 will do.

I'm guessing you're trying to build static OCL libraries, but even that works
for liborocos-reporting on my system. If RTT >= 1.1.0 is detected, shared
libraries are built automatically though.

Peter

wmeeusse's picture

[Bug 372] reporting does not build anymore

For more information about this bug, visit
A comment was added:
------- Comment #3 from wim [dot] meeussen [..] ... 2007-04-17 15:44

$ make VERGBOSE=9
Use: make dochtml docpdf to build the documentation.
[ 0%] Built target message
[ 4%] Built target orocos-ocl-common
[ 9%] Built target orocos-taskbrowser
[ 13%] Built target taskb
[ 18%] Built target helloworld
[ 31%] Built target orocos-reporting
Linking CXX executable report
/src/ocl/build-gnulinux/reporting/liborocos-reporting.so: undefined reference
to `OCL::ComponentFactories::Factories'
collect2: ld returned 1 exit status
make[2]: *** [reporting/tests/report] Error 1
make[1]: *** [reporting/tests/CMakeFiles/report.dir/all] Error 2
make: *** [all] Error 2

[Bug 372] reporting does not build anymore

For more information about this bug, visit
A comment was added:
------- Comment #2 from peter [dot] soetens [..] ... 2007-04-17 15:39

(In reply to comment #0)
> I get the following linking error when compiling the latest ocl with the latest
> rtt:
>
> Linking CXX shared library liborocos-reporting.so
> CMakeFiles/orocos-reporting.dir/FileReporting.o: In function
> `__static_initialization_and_destruction_0(int, int)':
> FileReporting.cpp:(.text+0xda): undefined reference to
> `OCL::ComponentFactories::Factories'
> /usr/bin/ld: CMakeFiles/orocos-reporting.dir/FileReporting.o: relocation
> R_X86_64_PC32 against `OCL::ComponentFactories::Factories' can not be used when
> making a shared object; recompile with -fPIC
> /usr/bin/ld: final link failed: Bad value
> collect2: ld returned 1 exit status
> make[2]: *** [reporting/liborocos-reporting.so] Error 1

I can't reproduce this. For these kinds of reports, the output of 'make
VERBOSE=1' is the least information required.

Peter

wmeeusse's picture

[Bug 372] reporting does not build anymore

For more information about this bug, visit
A comment was added:
------- Comment #1 from wim [dot] meeussen [..] ... 2007-04-17 15:23

I can confirm this bug.