-
Notifications
You must be signed in to change notification settings - Fork 86
Conversation
src/modelHandler_OpenCL.cpp:53:10: fatal error: 'filesystem' file not found #include <filesystem> ^~~~~~~~~~~~ ld: error: unable to find library -lstdc++fs
This breaks on linux (gcc 9.2.0)
gdb: Reading symbols from /home/katt/build/waifu2x-converter-cpp/out/waifu2x-converter-cpp...
warning: core file may not match specified executable file.
[New LWP 333262]
[New LWP 333268]
[New LWP 333275]
[New LWP 333266]
[New LWP 333273]
[New LWP 333267]
[New LWP 333269]
[New LWP 333272]
[New LWP 333270]
[New LWP 333277]
[New LWP 333271]
[New LWP 333265]
[New LWP 333276]
[New LWP 333274]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `./waifu2x-converter-cpp --log-level 2 -i 11153579'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007fcaf69c3d96 in Buffer::prealloc (this=0x56473955a8a0, conv=0x5647395671d0, env=0x564739551520) at /home/katt/build/waifu2x-converter-cpp/src/Buffer.cpp:336
336 cuCtxPushCurrent(dev->context);
[Current thread is 1 (Thread 0x7fcaf21ee400 (LWP 333262))]
/usr/lib/../share/gcc-9.2.0/python/libstdcxx/v6/xmethods.py:731: SyntaxWarning: list indices must be integers or slices, not str; perhaps you missed a comma?
refcounts = ['_M_refcount']['_M_pi'] backtrace:
|
@kattus, I can't reproduce with GCC 9.1.0 on FreeBSD using CPU or OpenCL. Can you check if CLI and the library are linked against libstdc++? Does the crash affect only CUDA?
|
Yeah I should've done that in my initial post, turns out it only crashes when using CUDA.
|
@kattus, does the following patch help? CUDA runtime doesn't use libstdc++, and CUDA toolkit is not relevant after build. I'd expect a crash if libstdc++fs symbols satisfied references from old libstdc++, not the other way around. diff --git a/CMakeLists.txt b/CMakeLists.txt
index bc7cd67..18005a2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -79,7 +79,7 @@ if(APPLE AND CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$")
endif()
elseif(UNIX OR MINGW)
# https://gitlab.kitware.com/cmake/cmake/issues/17834
- if (NOT FILE_SYSTEM_LIB AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9)
+ if (NOT FILE_SYSTEM_LIB)
set(FILE_SYSTEM_LIB "stdc++fs")
endif()
elseif(MSVC) |
It still crashes but with a different stacktrace and debug output:
gdb:
I made sure I had set |
Ignore everything I previously said, it turned I had CUDA uninstalled without me noticing, and even when compiled without CUDA support, it will try to use it. It has nothing to do with your PR. Very sorry for this. |
Tested on FreeBSD 11.3 (Clang/libc++ 8.0), 12.0 (Clang/libc++ 6.0), 13.0 (Clang/libc++ 9.0) and explicitly with GCC 8.1/9.1/7.4/6.5/5.5.
LINKER_LANGUAGE CXX
property setFILE_SYSTEM_LIB
<experimental/filesystem>
on non-Linux or Clang/libc++ as well