celix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Broekhuis <a.broekh...@gmail.com>
Subject Re: compiling fails on Fedora 17 x86_64
Date Fri, 22 Jun 2012 08:01:45 GMT
Hi Ferry,

/usr/bin/ld: ../utils/libremote_services_**utils.a(remote_services_utils.**c.o):
>> relocation R_X86_64_PC32 against undefined symbol
>> `bundleContext_getProperty' can not be used when making a shared object;
>> recompile with -fPIC
>> /usr/bin/ld: final link failed: Bad value
>> collect2: error: ld returned 1 exit status
>> make[2]: *** [remote_services/topology_**manager/libtopology_manager.**so]
>> Error 1
>> make[1]: *** [remote_services/topology_**manager/CMakeFiles/topology_**manager.dir/all]
>> Error 2
>> make: *** [all] Error 2
>>
>
At the moment I don't have a 64bit installation, so I can't test this
myself. I'll install a system for this, because it should work.

>
> Since I know nothing of cmake, I wonder if someone can point me in the
> right direction? I've tried looking up where the CFLAGS are defined but
> could not find it.


What you can try is to take some CMake script from the Dependency Manager
CMake file. This checks if the system is Unix/Linux and 64bit, and then
sets the PIC option. I've pasted it below this message.

Also it might be convenient to disable several subdirectories, currently
everything is build, making it difficult to track and fix problems. See [1]
for more details on this. I'm working on a quick and simple fix which will
do the job for now.

I hope this helps, if not, please send a reply!


[1]: http://incubator.markmail.org/thread/ckeecjio44244knj

-----------

# Add -fPIC for x86_64 Unix platforms; this lib will be linked to a shared
lib

if(UNIX AND NOT WIN32)

  find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )

  if(CMAKE_UNAME)

    exec_program(uname ARGS -m OUTPUT_VARIABLE CMAKE_SYSTEM_PROCESSOR)

    set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR} CACHE
INTERNAL "processor
type (i386 and x86_64)")

     if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")

      add_definitions(-fPIC)

    endif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")

  endif(CMAKE_UNAME)
endif(UNIX AND NOT WIN32)

>
>
> --
> Ferry Huberts
>
>


-- 
Met vriendelijke groet,

Alexander Broekhuis

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message