poco
poco copied to clipboard
Trying to Compile with emscripten: Target architecture was not detected as supported by Double-Conversion
Trying to compile the poco (1.9.0) libraries using emscripten compiler. Getting error in utils.h file in double-conversion. I guess latest double-conversion is not updated in poco source code. Can you please add the latest version of double-conversion? Or is it available already in develop branch?
As a temporary fix you could manually add the following to the end of the architecture list (in utils.h):
defined(__EMSCRIPTEN__)
just before the line
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
NOTE 1:
Also do a project search and replace for:
defined(EMSCRIPTEN)
to defined(__EMSCRIPTEN__)
I read that the former is not always defined but the latter is.
NOTE 2:
You may get errors on the NET library also (as raw sockets are not supported in Emscripten), to fix this add the following to the main CMakeLists.txt file
add_definitions(-DPOCO_NO_LINUX_IF_PACKET_H)
To compile with cmake do the following:
mkdir -p ./cmake_build rm -r ./cmake_build/* cd cmake_build emconfigure cmake -S .. -B . emmake make
This issue is stale because it has been open for 365 days with no activity.
This issue was closed because it has been inactive for 60 days since being marked as stale.
This issue is stale because it has been open for 365 days with no activity.
There are more issues when trying to compile code from latest devel (pre-1.13) with emscripten.
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.5 ()
[ 20%] Building CXX object Foundation/CMakeFiles/Foundation.dir/src/Thread.cpp.o
In file included from /home/ubuntu/git/graudata/warp/warpdrive-src/deps-2.4/poco/poco-src/Foundation/src/Thread.cpp:32:
/home/ubuntu/git/graudata/warp/warpdrive-src/deps-2.4/poco/poco-src/Foundation/src/Thread_POSIX.cpp:368:11: error: no member named 'syscall' in the global namespace
return ::syscall(SYS_gettid);
~~^
/home/ubuntu/git/graudata/warp/warpdrive-src/deps-2.4/poco/poco-src/Foundation/src/Thread_POSIX.cpp:368:19: error: use of undeclared identifier 'SYS_gettid'
return ::syscall(SYS_gettid);
^
Initially reported issue with double conversion was fixed in 1.12 (commit d294391c94ea0f0c31bdc2ba71d0c9d1035792f7).
Other issues are being resolved for release 1.13.
Created PR #4318.