Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emsdk 3.1.50 cause builds errors #363

Open
kalwalt opened this issue Dec 20, 2023 · 1 comment
Open

emsdk 3.1.50 cause builds errors #363

kalwalt opened this issue Dec 20, 2023 · 1 comment
Assignees
Labels
bug Something isn't working emscripten

Comments

@kalwalt
Copy link
Member

kalwalt commented Dec 20, 2023

If you try to build with emsdk 3.1.50 the build process end with this error message:

Running command: emcc -I/src/emscripten/WebARKitLib/include -I/src/build/ -I/src/emscripten/ -I/src/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher /src/emscripten/WebARKitLib/lib/SRC/AR/arLabelingSub/*.c /src/emscripten/WebARKitLib/lib/SRC/AR/*.c /src/emscripten/WebARKitLib/lib/SRC/ARICP/*.c /src/emscripten/WebARKitLib/lib/SRC/ARUtil/log.c /src/emscripten/WebARKitLib/lib/SRC/ARUtil/file_utils.c /src/emscripten/WebARKitLib/lib/SRC/AR2/handle.c /src/emscripten/WebARKitLib/lib/SRC/AR2/imageSet.c /src/emscripten/WebARKitLib/lib/SRC/AR2/jpeg.c /src/emscripten/WebARKitLib/lib/SRC/AR2/marker.c /src/emscripten/WebARKitLib/lib/SRC/AR2/featureMap.c /src/emscripten/WebARKitLib/lib/SRC/AR2/featureSet.c /src/emscripten/WebARKitLib/lib/SRC/AR2/selectTemplate.c /src/emscripten/WebARKitLib/lib/SRC/AR2/surface.c /src/emscripten/WebARKitLib/lib/SRC/AR2/tracking.c /src/emscripten/WebARKitLib/lib/SRC/AR2/tracking2d.c /src/emscripten/WebARKitLib/lib/SRC/AR2/matching.c /src/emscripten/WebARKitLib/lib/SRC/AR2/matching2.c /src/emscripten/WebARKitLib/lib/SRC/AR2/template.c /src/emscripten/WebARKitLib/lib/SRC/AR2/searchPoint.c /src/emscripten/WebARKitLib/lib/SRC/AR2/coord.c /src/emscripten/WebARKitLib/lib/SRC/AR2/util.c /src/emscripten/WebARKitLib/lib/SRC/KPM/kpmHandle.cpp /src/emscripten/WebARKitLib/lib/SRC/KPM/kpmRefDataSet.cpp /src/emscripten/WebARKitLib/lib/SRC/KPM/kpmMatching.cpp /src/emscripten/WebARKitLib/lib/SRC/KPM/kpmResult.cpp /src/emscripten/WebARKitLib/lib/SRC/KPM/kpmUtil.cpp /src/emscripten/WebARKitLib/lib/SRC/KPM/kpmFopen.c /src/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/detectors/DoG_scale_invariant_detector.cpp /src/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/detectors/gaussian_scale_space_pyramid.cpp /src/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/detectors/gradients.cpp /src/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/detectors/harris.cpp /src/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/detectors/orientation_assignment.cpp /src/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/detectors/pyramid.cpp /src/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/facade/visual_database_facade.cpp /src/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/matchers/hough_similarity_voting.cpp /src/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/matchers/freak.cpp /src/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/framework/date_time.cpp /src/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/framework/image.cpp /src/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/framework/logger.cpp /src/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/framework/timers.cpp /src/emscripten/WebARKitLib/lib/SRC/WebARKit/WebARKitLog.cpp -Oz  -Wno-warn-absolute-paths -s TOTAL_MEMORY=134217728  -s USE_ZLIB=1 -s USE_LIBJPEG=1 --memory-init-file 0 -s EXPORTED_RUNTIME_METHODS=["FS"] -s ALLOW_MEMORY_GROWTH=1 --bind    -D HAVE_NFT -D WITH_FILTERING=1 -r -o /src/build/libar.bc 

stderr: ports:INFO: retrieving port: zlib from https://github.com/madler/zlib/archive/refs/tags/v1.2.13.tar.gz
ports:INFO: unpacking port: zlib
cache:INFO: generating port: sysroot/lib/wasm32-emscripten/libz.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/libz.a" for subsequent builds)
system_libs:INFO: compiled 15 inputs in 1.27s
cache:INFO:  - ok
ports:INFO: retrieving port: libjpeg from https://storage.googleapis.com/webassembly/emscripten-ports/jpegsrc.v9c.tar.gz
ports:INFO: unpacking port: libjpeg
cache:INFO: generating port: sysroot/lib/wasm32-emscripten/libjpeg.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/libjpeg.a" for subsequent builds)
system_libs:INFO: compiled 59 inputs in 1.86s
cache:INFO:  - ok
/src/emscripten/WebARKitLib/lib/SRC/AR2/selectTemplate.c:279:41: warning: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 [-Wimplicit-const-int-float-conversion]
  279 |         k = (int)((float )j * rand() / (RAND_MAX + 1.0F));
      |                                         ^~~~~~~~ ~
/emsdk/upstream/emscripten/cache/sysroot/include/stdlib.h:84:19: note: expanded from macro 'RAND_MAX'
   84 | #define RAND_MAX (0x7fffffff)
      |                   ^~~~~~~~~~
1 warning generated.
In file included from /src/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/facade/visual_database_facade.cpp:37:
In file included from /src/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/matchers/visual_database-inline.h:44:
In file included from /src/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/matchers/visual_database.h:44:
In file included from /src/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/homography_estimation/robust_homography.h:45:
In file included from /src/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/Eigen/Core:50:
/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/complex:1404:53: error: expected unqualified-id
 1404 |     if (__x.real() == 0 && (__x.imag() == 0 || std::isnan(__x.imag())))
      |                                                     ^
/src/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/framework/error.h:66:18: note: expanded from macro 'isnan'
   66 | #define isnan(x) ((x) != (x))
      |                  ^
1 error generated.
emcc: error: '/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --sysroot=/emsdk/upstream/emscripten/cache/sysroot -DEMSCRIPTEN -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/fakesdl -Xclang -iwithsysroot/include/compat -I/src/emscripten/WebARKitLib/include -I/src/build/ -I/src/emscripten/ -I/src/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher -Oz -D HAVE_NFT -D WITH_FILTERING=1 /src/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/facade/visual_database_facade.cpp -c -o /tmp/emscripten_temp_5gen0ckr/visual_database_facade_100.o' failed (returned 1)

exec error: 1
Built at Wed Dec 20 22:30:43 UTC 2023
npm notice 
npm notice New major version of npm available! 8.19.4 -> 10.2.5
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.2.5>
npm notice Run `npm install -g npm@10.2.5` to update!
npm notice 

As you can see this happens while building the libar.bc intermediate libs. I have no idea why this happens but i will investigate.

@kalwalt kalwalt added bug Something isn't working emscripten labels Dec 20, 2023
@kalwalt kalwalt self-assigned this Dec 20, 2023
@kalwalt
Copy link
Member Author

kalwalt commented Dec 20, 2023

complete log with verbose output at this gist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working emscripten
Projects
None yet
Development

No branches or pull requests

1 participant