You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by "Rob ten Hove (JIRA)" <ji...@apache.org> on 2011/05/25 21:55:47 UTC
[jira] [Created] (CELIX-4) Problems building Celix on x86_64 Linux
Problems building Celix on x86_64 Linux
---------------------------------------
Key: CELIX-4
URL: https://issues.apache.org/jira/browse/CELIX-4
Project: Celix
Issue Type: Bug
Environment: Linux xray 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
Reporter: Rob ten Hove
Priority: Minor
Tried building Celix today on 64bit Linux, but encountered two problems:
1) Directory "deployer" is mentioned in /CMakeLists.txt, but doesn't exist:
CMake Error at CMakeLists.txt:63 (add_subdirectory):
add_subdirectory given source "deployer" which is not an existing
directory.
2) Running cmake and then make causes linking problems:
Linking C shared library libtracker_depman.so
/usr/bin/ld: ../../dependency_manager/libdependency_manager.a(service_component.c.o): relocation R_X86_64_32S against `service_init' can not be used when making a shared object; recompile with -fPIC
../../dependency_manager/libdependency_manager.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [whiteboard/tracker_depman/libtracker_depman.so] Error 1
make[1]: *** [whiteboard/tracker_depman/CMakeFiles/tracker_depman.dir/all] Error 2
make: *** [all] Error 2
Adding a global CFLAGS=-fPIC works, but I guess this is not a feasible solution. Building a shared lib instead of a static one for dependency_manager works, but don't know if this is feasible too.
Solution that could work is adding a check for the platform for dependency_manager, and then specifically adding -fPIC for that lib in case the platform is 64bit Unix.
Found the latter suggestion on http://www.cmake.org/pipermail/cmake/2007-May/014350.html
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CELIX-4) Problems building Celix on x86_64
Linux
Posted by "Alexander Broekhuis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CELIX-4?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13039324#comment-13039324 ]
Alexander Broekhuis commented on CELIX-4:
-----------------------------------------
Committed to revision 1127681
> Problems building Celix on x86_64 Linux
> ---------------------------------------
>
> Key: CELIX-4
> URL: https://issues.apache.org/jira/browse/CELIX-4
> Project: Celix
> Issue Type: Bug
> Environment: Linux xray 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
> Reporter: Rob ten Hove
> Priority: Minor
> Attachments: fix_cmake_x86_64.patch
>
>
> Tried building Celix today on 64bit Linux, but encountered two problems:
> 1) Directory "deployer" is mentioned in /CMakeLists.txt, but doesn't exist:
> CMake Error at CMakeLists.txt:63 (add_subdirectory):
> add_subdirectory given source "deployer" which is not an existing
> directory.
> 2) Running cmake and then make causes linking problems:
> Linking C shared library libtracker_depman.so
> /usr/bin/ld: ../../dependency_manager/libdependency_manager.a(service_component.c.o): relocation R_X86_64_32S against `service_init' can not be used when making a shared object; recompile with -fPIC
> ../../dependency_manager/libdependency_manager.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make[2]: *** [whiteboard/tracker_depman/libtracker_depman.so] Error 1
> make[1]: *** [whiteboard/tracker_depman/CMakeFiles/tracker_depman.dir/all] Error 2
> make: *** [all] Error 2
> Adding a global CFLAGS=-fPIC works, but I guess this is not a feasible solution. Building a shared lib instead of a static one for dependency_manager works, but don't know if this is feasible too.
> Solution that could work is adding a check for the platform for dependency_manager, and then specifically adding -fPIC for that lib in case the platform is 64bit Unix.
> Found the latter suggestion on http://www.cmake.org/pipermail/cmake/2007-May/014350.html
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (CELIX-4) Problems building Celix on x86_64 Linux
Posted by "Alexander Broekhuis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CELIX-4?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Broekhuis closed CELIX-4.
-----------------------------------
Closed since everything seems to be ok.
> Problems building Celix on x86_64 Linux
> ---------------------------------------
>
> Key: CELIX-4
> URL: https://issues.apache.org/jira/browse/CELIX-4
> Project: Celix
> Issue Type: Bug
> Environment: Linux xray 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
> Reporter: Rob ten Hove
> Assignee: Alexander Broekhuis
> Priority: Minor
> Attachments: fix_cmake_x86_64.patch
>
>
> Tried building Celix today on 64bit Linux, but encountered two problems:
> 1) Directory "deployer" is mentioned in /CMakeLists.txt, but doesn't exist:
> CMake Error at CMakeLists.txt:63 (add_subdirectory):
> add_subdirectory given source "deployer" which is not an existing
> directory.
> 2) Running cmake and then make causes linking problems:
> Linking C shared library libtracker_depman.so
> /usr/bin/ld: ../../dependency_manager/libdependency_manager.a(service_component.c.o): relocation R_X86_64_32S against `service_init' can not be used when making a shared object; recompile with -fPIC
> ../../dependency_manager/libdependency_manager.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make[2]: *** [whiteboard/tracker_depman/libtracker_depman.so] Error 1
> make[1]: *** [whiteboard/tracker_depman/CMakeFiles/tracker_depman.dir/all] Error 2
> make: *** [all] Error 2
> Adding a global CFLAGS=-fPIC works, but I guess this is not a feasible solution. Building a shared lib instead of a static one for dependency_manager works, but don't know if this is feasible too.
> Solution that could work is adding a check for the platform for dependency_manager, and then specifically adding -fPIC for that lib in case the platform is 64bit Unix.
> Found the latter suggestion on http://www.cmake.org/pipermail/cmake/2007-May/014350.html
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (CELIX-4) Problems building Celix on x86_64 Linux
Posted by "Alexander Broekhuis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CELIX-4?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Broekhuis reassigned CELIX-4:
---------------------------------------
Assignee: Alexander Broekhuis
> Problems building Celix on x86_64 Linux
> ---------------------------------------
>
> Key: CELIX-4
> URL: https://issues.apache.org/jira/browse/CELIX-4
> Project: Celix
> Issue Type: Bug
> Environment: Linux xray 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
> Reporter: Rob ten Hove
> Assignee: Alexander Broekhuis
> Priority: Minor
> Attachments: fix_cmake_x86_64.patch
>
>
> Tried building Celix today on 64bit Linux, but encountered two problems:
> 1) Directory "deployer" is mentioned in /CMakeLists.txt, but doesn't exist:
> CMake Error at CMakeLists.txt:63 (add_subdirectory):
> add_subdirectory given source "deployer" which is not an existing
> directory.
> 2) Running cmake and then make causes linking problems:
> Linking C shared library libtracker_depman.so
> /usr/bin/ld: ../../dependency_manager/libdependency_manager.a(service_component.c.o): relocation R_X86_64_32S against `service_init' can not be used when making a shared object; recompile with -fPIC
> ../../dependency_manager/libdependency_manager.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make[2]: *** [whiteboard/tracker_depman/libtracker_depman.so] Error 1
> make[1]: *** [whiteboard/tracker_depman/CMakeFiles/tracker_depman.dir/all] Error 2
> make: *** [all] Error 2
> Adding a global CFLAGS=-fPIC works, but I guess this is not a feasible solution. Building a shared lib instead of a static one for dependency_manager works, but don't know if this is feasible too.
> Solution that could work is adding a check for the platform for dependency_manager, and then specifically adding -fPIC for that lib in case the platform is 64bit Unix.
> Found the latter suggestion on http://www.cmake.org/pipermail/cmake/2007-May/014350.html
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CELIX-4) Problems building Celix on x86_64 Linux
Posted by "Rob ten Hove (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CELIX-4?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rob ten Hove updated CELIX-4:
-----------------------------
Attachment: fix_cmake_x86_64.patch
Added patch with possible fix. Please review since I'm no C hero (yet :-)
> Problems building Celix on x86_64 Linux
> ---------------------------------------
>
> Key: CELIX-4
> URL: https://issues.apache.org/jira/browse/CELIX-4
> Project: Celix
> Issue Type: Bug
> Environment: Linux xray 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
> Reporter: Rob ten Hove
> Priority: Minor
> Attachments: fix_cmake_x86_64.patch
>
>
> Tried building Celix today on 64bit Linux, but encountered two problems:
> 1) Directory "deployer" is mentioned in /CMakeLists.txt, but doesn't exist:
> CMake Error at CMakeLists.txt:63 (add_subdirectory):
> add_subdirectory given source "deployer" which is not an existing
> directory.
> 2) Running cmake and then make causes linking problems:
> Linking C shared library libtracker_depman.so
> /usr/bin/ld: ../../dependency_manager/libdependency_manager.a(service_component.c.o): relocation R_X86_64_32S against `service_init' can not be used when making a shared object; recompile with -fPIC
> ../../dependency_manager/libdependency_manager.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make[2]: *** [whiteboard/tracker_depman/libtracker_depman.so] Error 1
> make[1]: *** [whiteboard/tracker_depman/CMakeFiles/tracker_depman.dir/all] Error 2
> make: *** [all] Error 2
> Adding a global CFLAGS=-fPIC works, but I guess this is not a feasible solution. Building a shared lib instead of a static one for dependency_manager works, but don't know if this is feasible too.
> Solution that could work is adding a check for the platform for dependency_manager, and then specifically adding -fPIC for that lib in case the platform is 64bit Unix.
> Found the latter suggestion on http://www.cmake.org/pipermail/cmake/2007-May/014350.html
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CELIX-4) Problems building Celix on x86_64
Linux
Posted by "Alexander Broekhuis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CELIX-4?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13039317#comment-13039317 ]
Alexander Broekhuis commented on CELIX-4:
-----------------------------------------
Hi Rob,
Thanks for the patch, looks good. -fPIC can be used for linking static libs to shared libs on 32 bit as well, so the 32/64 bit check isn't really needed. Although some pages disagree and some even mention that a static lib shouldn't be linked to a shared lib at all. If that is really the case, we have to look at how we use the dependency manager. Building it as a shared library by itself does work, but there are problems related to dynamically loading multiple libraries from 1 bundle.
For now linking static libs to shared libs seems to work on linux 32 and 64, so I will leave it as is (with the -fPIC fix for 64bit).
Background info: http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3
> Problems building Celix on x86_64 Linux
> ---------------------------------------
>
> Key: CELIX-4
> URL: https://issues.apache.org/jira/browse/CELIX-4
> Project: Celix
> Issue Type: Bug
> Environment: Linux xray 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
> Reporter: Rob ten Hove
> Priority: Minor
> Attachments: fix_cmake_x86_64.patch
>
>
> Tried building Celix today on 64bit Linux, but encountered two problems:
> 1) Directory "deployer" is mentioned in /CMakeLists.txt, but doesn't exist:
> CMake Error at CMakeLists.txt:63 (add_subdirectory):
> add_subdirectory given source "deployer" which is not an existing
> directory.
> 2) Running cmake and then make causes linking problems:
> Linking C shared library libtracker_depman.so
> /usr/bin/ld: ../../dependency_manager/libdependency_manager.a(service_component.c.o): relocation R_X86_64_32S against `service_init' can not be used when making a shared object; recompile with -fPIC
> ../../dependency_manager/libdependency_manager.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make[2]: *** [whiteboard/tracker_depman/libtracker_depman.so] Error 1
> make[1]: *** [whiteboard/tracker_depman/CMakeFiles/tracker_depman.dir/all] Error 2
> make: *** [all] Error 2
> Adding a global CFLAGS=-fPIC works, but I guess this is not a feasible solution. Building a shared lib instead of a static one for dependency_manager works, but don't know if this is feasible too.
> Solution that could work is adding a check for the platform for dependency_manager, and then specifically adding -fPIC for that lib in case the platform is 64bit Unix.
> Found the latter suggestion on http://www.cmake.org/pipermail/cmake/2007-May/014350.html
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CELIX-4) Problems building Celix on x86_64 Linux
Posted by "Alexander Broekhuis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CELIX-4?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Broekhuis resolved CELIX-4.
-------------------------------------
Resolution: Fixed
> Problems building Celix on x86_64 Linux
> ---------------------------------------
>
> Key: CELIX-4
> URL: https://issues.apache.org/jira/browse/CELIX-4
> Project: Celix
> Issue Type: Bug
> Environment: Linux xray 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
> Reporter: Rob ten Hove
> Assignee: Alexander Broekhuis
> Priority: Minor
> Attachments: fix_cmake_x86_64.patch
>
>
> Tried building Celix today on 64bit Linux, but encountered two problems:
> 1) Directory "deployer" is mentioned in /CMakeLists.txt, but doesn't exist:
> CMake Error at CMakeLists.txt:63 (add_subdirectory):
> add_subdirectory given source "deployer" which is not an existing
> directory.
> 2) Running cmake and then make causes linking problems:
> Linking C shared library libtracker_depman.so
> /usr/bin/ld: ../../dependency_manager/libdependency_manager.a(service_component.c.o): relocation R_X86_64_32S against `service_init' can not be used when making a shared object; recompile with -fPIC
> ../../dependency_manager/libdependency_manager.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make[2]: *** [whiteboard/tracker_depman/libtracker_depman.so] Error 1
> make[1]: *** [whiteboard/tracker_depman/CMakeFiles/tracker_depman.dir/all] Error 2
> make: *** [all] Error 2
> Adding a global CFLAGS=-fPIC works, but I guess this is not a feasible solution. Building a shared lib instead of a static one for dependency_manager works, but don't know if this is feasible too.
> Solution that could work is adding a check for the platform for dependency_manager, and then specifically adding -fPIC for that lib in case the platform is 64bit Unix.
> Found the latter suggestion on http://www.cmake.org/pipermail/cmake/2007-May/014350.html
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira