On Sat, Jun 2, 2012 at 5:47 PM, Hamish <[email protected]> wrote: > Hamish wrote: >> > >> > [...] >> > Linking CXX executable gpsdrive >> > /usr/bin/ld: CMakeFiles/gpsdrive.dir/mapnik.o: undefined reference to >> > symbol 'boost::system::system_category()' >> > /usr/bin/ld: note: 'boost::system::system_category()' is defined in DSO >> > /usr/lib/libboost_system.so.1.46.1 so try adding it to the linker command >> > line >> > /usr/lib/libboost_system.so.1.46.1: could not read symbols: Invalid >> > operation >> > collect2: ld returned 1 exit status >> > make[3]: *** [src/gpsdrive] Error 1 > > Aron wrote: >> Can you let CMake expose the full command line of this step? >> It looks like there aren't -lboost-system explicitly specified >> in the command. > > I'm not sure how to do that.. (I'm no cmake expert) > > I tried setting `cmake -DCMAKE_BUILD_TYPE=Debug`, now it gives > this similar-but-different error in sid: > > [...] > Linking CXX executable gpsdrive > /usr/bin/ld: CMakeFiles/gpsdrive.dir/mapnik.o: undefined reference to symbol > '_ZTVN5boost6detail16thread_data_baseE' > /usr/bin/ld: note: '_ZTVN5boost6detail16thread_data_baseE' is defined in DSO > /usr/lib/libboost_thread.so.1.49.0 so try adding it to the linker command line > /usr/lib/libboost_thread.so.1.49.0: could not read symbols: Invalid operation > collect2: error: ld returned 1 exit status > make[3]: *** [src/gpsdrive] Error 1 >
This does not expose the actual command called when linking, expect something started with gcc/g++. > > ah, "#593876 libboost-filesystem-dev: Undeclared indirect > dependency of boost_filesystem on boost_system causes link > failure" > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593876 > > no idea how to work around that either (I guess forcibly > depending on libboost-system, but still don't know how?). > I don't know where's the actual code and packaging stuff that you are currently working on, but some CMake program uses TARGET_LINK_LIBRARIES to generate a target, and you can add libraries there. But it's not for all, some more skilled CMake users may use more advanced way of linking. -- Regards, Aron Xu -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/CAMr=8w63iYCj=ncpgre8oq8sqh0nt0xqofn8cu2nprxkmna...@mail.gmail.com
