gdal-js
gdal-js copied to clipboard
`./scripts/make gdal` errors in Ubuntu
Thanks for your work @ddohler !
Using the following OS:
OS: Ubuntu 22.04.1 LTS x86_64
./scripts/make gdal
generates the following error:
make[3]: Entering directory '/opt/gdaljs/gdal/frmts/pcidsk'
/opt/emsdk/upstream/emscripten/em++ -c -DHAVE_LIBJPEG -I../jpeg/libjpeg -DPCIDSK_INTERNAL -Isdk -I/opt/gdaljs/gdal/port -DGDAL_COMPILATION -g -O2 -fPIC -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wshorten-64-to-32 -Wshadow -Werror=vla -Wdate-time -Wnull-dereference -Wextra-semi -Wcomma -Wfloat-conversion -Wdocumentation -Wno-documentation-deprecated-sync -Wunused-private-field -Wmissing-prototypes -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names -Wzero-as-null-pointer-constant -Wsuggest-override -Wimplicit-fallthrough sdk/core/clinksegment.cpp -o ../o/clinksegment.o
shared:INFO: (Emscripten: Running sanity checks)
sdk/core/clinksegment.cpp:79:27: error: no member named 'bind2nd' in namespace 'std'
std::bind2nd(std::not_equal_to<char>(), ' '));
~~~~~^
1 error generated.
em++: error: '/opt/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 -DEMSCRIPTEN -I/opt/emsdk/upstream/emscripten/cache/sysroot/include/SDL --sysroot=/opt/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -c -DHAVE_LIBJPEG -I../jpeg/libjpeg -DPCIDSK_INTERNAL -Isdk -I/opt/gdaljs/gdal/port -DGDAL_COMPILATION -g3 -O2 -fPIC -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wshorten-64-to-32 -Wshadow -Werror=vla -Wdate-time -Wnull-dereference -Wextra-semi -Wcomma -Wfloat-conversion -Wdocumentation -Wno-documentation-deprecated-sync -Wunused-private-field -Wmissing-prototypes -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names -Wzero-as-null-pointer-constant -Wsuggest-override -Wimplicit-fallthrough -O3 sdk/core/clinksegment.cpp -o ../o/clinksegment.o' failed (returned 1)
make[3]: *** [GNUmakefile:76: ../o/clinksegment.o] Error 1
make[3]: Leaving directory '/opt/gdaljs/gdal/frmts/pcidsk'
make[2]: *** [GNUmakefile:15: pcidsk-install-obj] Error 2
make[2]: Leaving directory '/opt/gdaljs/gdal/frmts'
make[1]: *** [GNUmakefile:103: frmts-target] Error 2
make[1]: Leaving directory '/opt/gdaljs/gdal'
emmake: error: 'make static-lib' failed (returned 2)
make: *** [Makefile:179: gdal/libgdal.a] Error 1
Any ideas on what might be going wrong here? this is a relevant thread.
On a side note, could verify the examples working on MacOS.
Hi @plant99 ! I'm not sure why you would be seeing different behavior across the two platforms -- the development environment is in a Docker container based off Ubuntu 20.04. One thing I would check is to run ./scripts/console
from both environments and then compare the output from emsdk list
. If it is the same, try running emsdk activate latest && make clean && make gdal
(still within the ./scripts/console
on both platforms.
Just an update that I've replicated this locally. I'll try to take a look at this tomorrow!
Just an update that I've replicated this locally. I'll try to take a look at this tomorrow!
Awesome, please take your time! And apologies for a late response, I had missed this notification.
@plant99 This was an issue with newer versions of the Emscripten SDK. I've pinned to a slightly older version and that has resolved the issue on my end. Hope this helps!