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

Build fails when compiling for node-es6 #41

Closed
atjn opened this issue Jan 26, 2023 · 2 comments
Closed

Build fails when compiling for node-es6 #41

atjn opened this issue Jan 26, 2023 · 2 comments

Comments

@atjn
Copy link
Contributor

atjn commented Jan 26, 2023

My build fails when compiling newer versions of wasm-vips. It fails when generating the node-es6 bindings with the following errors:

wasm-ld: error: /src/build/target/lib/libz.a(crc32.o): relocation R_WASM_MEMORY_ADDR_SLEB cannot be used against symbol `crc_table`; recompile with -fPIC
wasm-ld: error: /src/build/target/lib/libz.a(crc32.o): relocation R_WASM_MEMORY_ADDR_LEB cannot be used against symbol `functable`; recompile with -fPIC
wasm-ld: error: /src/build/target/lib/libz.a(functable.o): relocation R_WASM_TABLE_INDEX_SLEB cannot be used against symbol `insert_string_c`; recompile with -fPIC
wasm-ld: error: /src/build/target/lib/libz.a(functable.o): relocation R_WASM_MEMORY_ADDR_LEB cannot be used against symbol `cpu_check_features.features_checked`; recompile with -fPIC
wasm-ld: error: /src/build/target/lib/libz.a(functable.o): relocation R_WASM_TABLE_INDEX_SLEB cannot be used against symbol `quick_insert_string_c`; recompile with -fPIC

There are many more lines that are all similar to the ones above.

I am building this in the Docker container by running npm run build, so I would be surprised if this issue is specific to my computer.

I am happy to test a fix for you. I am trying to figure one out myself, but so far have not found anything.

@atjn atjn changed the title Build fails when compiling node-es6.js Build fails when compiling for node-es6 Jan 26, 2023
@atjn
Copy link
Contributor Author

atjn commented Jan 27, 2023

After messing around for a few hours I was suddenly able to compile the latest version without errors. I am guessing that I had an old version of something cached, and for some reason it wasn't invalidated.

@atjn atjn closed this as completed Jan 27, 2023
@kleisauke
Copy link
Owner

Looks like PIC and non-PIC libraries are mixed. If this occurs again, removing the build/target directory would probably fix this. This ensures that all dependencies are rebuilt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants