Closed dvdesolve closed 4 years ago
Same procedure, I'd like to have a copy of your CMakeFiles/*/link.txt
files inside your build directory.
Thanks!
Diff to fix:
--- CMakeLists.txt.old 2019-12-31 17:59:14.471227845 +0300
+++ CMakeLists.txt 2019-12-31 18:01:12.973696170 +0300
@@ -228,10 +228,15 @@
PRIVATE . ${UTILDIR} ${CODECLIB_DIR} ${SRCDIR})
# Required dependencies
set_target_properties(suscan.status PROPERTIES COMPILE_FLAGS "${SIGUTILS_SPC_CFLAGS}")
+link_directories(suscan.status ${PROJECT_BINARY_DIR})
+target_link_libraries(suscan.status sigutils)
+target_link_libraries(suscan.status suscan)
+target_link_libraries(suscan.status m)
+
target_include_directories(suscan.status SYSTEM PUBLIC ${SNDFILE_INCLUDE_DIRS})
target_link_libraries(suscan.status ${SNDFILE_LIBRARIES})
target_include_directories(suscan.status SYSTEM PUBLIC ${FFTW3_INCLUDE_DIRS})
target_link_libraries(suscan.status ${FFTW3_LIBRARIES})
@@ -241,14 +246,10 @@
target_include_directories(suscan.status SYSTEM PUBLIC ${XML2_INCLUDE_DIRS})
target_link_libraries(suscan.status ${XML2_LIBRARIES})
target_link_libraries(suscan.status ${CMAKE_THREAD_LIBS_INIT})
-link_directories(suscan.status ${PROJECT_BINARY_DIR})
-target_link_libraries(suscan.status sigutils)
-target_link_libraries(suscan.status suscan)
-target_link_libraries(suscan.status m)
# Optional dependencies
if(VOLK_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_VOLK=1")
target_include_directories(suscan.status SYSTEM PUBLIC ${VOLK_INCLUDE_DIRS})
Latest commit, makepkg
still complains about buildroot traces:
[23:24 viktor@desolve-nettop ~/build/aur/suscan-git]$ strings suscan.status | grep makepkg
/tmp/makepkg/suscan-git/src/suscan-git/src/fingerprint.c
[23:24 viktor@desolve-nettop ~/build/aur/suscan-git]$ strings libsuscan.so | grep makepkg
/tmp/makepkg/suscan-git/src/suscan-git/util/cfg.c
/tmp/makepkg/suscan-git/src/suscan-git/util/confdb.c
/tmp/makepkg/suscan-git/src/suscan-git/util/deserialize.c
/tmp/makepkg/suscan-git/src/suscan-git/util/object.c
/tmp/makepkg/suscan-git/src/suscan-git/util/serialize.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/inspector/inspector.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/inspector/interface.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/inspector/params.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/inspector/impl/ask.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/inspector/impl/audio.c
?/tmp/makepkg/suscan-git/src/suscan-git/analyzer/inspector/impl/fsk.c
yE>/tmp/makepkg/suscan-git/src/suscan-git/analyzer/inspector/impl/psk.c
/tmp/makepkg/suscan-git/src/suscan-git/codec/codec.c
/tmp/makepkg/suscan-git/src/suscan-git/codec/codecs/diff.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/analyzer.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/bufpool.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/client.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/estimator.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/inspsched.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/insp-server.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/mq.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/msg.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/slow.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/source.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/spectsrc.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/symbuf.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/estimators/fac.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/estimators/nonlinear.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/spectsrcs/cyclo.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/spectsrcs/fmcyclo.c
>/tmp/makepkg/suscan-git/src/suscan-git/analyzer/spectsrcs/fmspect.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/spectsrcs/pmspect.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/spectsrcs/timediff.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/spectsrcs/exp-2.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/spectsrcs/exp-4.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/spectsrcs/exp-8.c
/tmp/makepkg/suscan-git/src/suscan-git/analyzer/spectsrcs/psd.c
Strange, it's like the substitution is not working (maybe because there are symlinks in the build path). Could you try replacing the following line in CMakeLists.txt
set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -D__FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'")
With:
set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -D__FILENAME__='\"$(subst $(realpath ${CMAKE_SOURCE_DIR})/,,$(realpath $<))\"'")
And try again? If this does not work either, we can conditionally define FILENAME to the base name of the file when building in release mode.
Still doesn't work =\
The following should remove any reference to build paths in the source code. Replace in CMakeLists the following line:
set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -D__FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'")
With:
set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -D__FILENAME__='\"none\"'")
If it still does not work, it would mean that there is something fishy going on and I would have to reverse engineer your compiled library (libsuscan.so) and figure out where these paths are being referenced at.
Now I have a different problem during linking. I believe that this is related to the latest commits:
[100%] Linking C executable suscan.status
/usr/bin/ld: libsuscan.so: undefined reference to `su_channel_detector_get_iters'
/usr/bin/ld: libsuscan.so: undefined reference to `su_channel_detector_rewind'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/suscan.status.dir/build.make:130: suscan.status] Error 1
make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/suscan.status.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
Indeed, I've been working on it yesterday. Pull the latest sigutils
and build again.
Tried with latest sigutils - works fine!
Problems described here are pretty much the same as in BatchDrake/sigutils#14 so I will post here only the relevant messages. AUR package is available here
Linking problem
Referencing to the temporary tree