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

wasm-ld doesn't support required flags #9565

Closed
Beuc opened this issue Oct 2, 2019 · 5 comments

Comments

@Beuc
Copy link
Contributor

commented Oct 2, 2019

Hi,

When compiling ffmpeg with 1.38.46, I used to get warnings like:

emcc:WARNING: ignoring unsupported linker flag: `-soname`
emcc:WARNING: ignoring unsupported linker flag: `libavutil.so.55`
emcc:WARNING: ignoring unsupported linker flag: `-Bsymbolic`
emcc:WARNING: ignoring unsupported linker flag: `--version-script`
emcc:WARNING: ignoring unsupported linker flag: `libavutil/libavutil.ver`
emcc:WARNING: ignoring unsupported linker flag: `--as-needed`
emcc:WARNING: ignoring unsupported linker flag: `-z`
emcc:WARNING: ignoring unsupported linker flag: `noexecstack`
emcc:WARNING: ignoring unsupported linker flag: `--warn-common`
emcc:WARNING: ignoring unsupported linker flag: `-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample`

I now get:

wasm-ld: error: unknown argument: -soname
wasm-ld: error: cannot open libavutil.so.55: No such file or directory

shared:ERROR: '/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/bin/wasm-ld -o libavutil/libavutil.so.55 --allow-undefined --lto-O0 -soname libavutil.so.55 -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavresample -Llibavutil -Llibpostproc -Llibswscale -Llibswresample -z noexecstack libavutil/adler32.o libavutil/aes.o libavutil/aes_ctr.o libavutil/audio_fifo.o libavutil/avstring.o libavutil/base64.o libavutil/blowfish.o libavutil/bprint.o libavutil/buffer.o libavutil/camellia.o libavutil/cast5.o libavutil/channel_layout.o libavutil/color_utils.o libavutil/cpu.o libavutil/crc.o libavutil/des.o libavutil/dict.o libavutil/display.o libavutil/downmix_info.o libavutil/error.o libavutil/eval.o libavutil/fifo.o libavutil/file.o libavutil/file_open.o libavutil/fixed_dsp.o libavutil/float_dsp.o libavutil/frame.o libavutil/hash.o libavutil/hmac.o libavutil/imgutils.o libavutil/integer.o libavutil/intmath.o libavutil/lfg.o libavutil/lls.o libavutil/log.o libavutil/log2_tab.o libavutil/mastering_display_metadata.o libavutil/mathematics.o libavutil/md5.o libavutil/mem.o libavutil/murmur3.o libavutil/opt.o libavutil/parseutils.o libavutil/pixdesc.o libavutil/pixelutils.o libavutil/random_seed.o libavutil/rational.o libavutil/rc4.o libavutil/reverse.o libavutil/ripemd.o libavutil/samplefmt.o libavutil/sha.o libavutil/sha512.o libavutil/stereo3d.o libavutil/tea.o libavutil/threadmessage.o libavutil/time.o libavutil/timecode.o libavutil/tree.o libavutil/twofish.o libavutil/utils.o libavutil/xga_font_data.o libavutil/xtea.o -L/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten-git/system/local/lib -L/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten-git/system/lib -L/home/me/workdir/emtests/renpyweb-asyncify/emsdk/.emscripten_cache/wasm-obj --import-memory --import-table -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --export __wasm_call_ctors --export __data_end --export main --export malloc --export free --export setThrew --export __errno_location --export fflush -z stack-size=5242880 --initial-memory=16777216 --no-entry --max-memory=16777216 --global-base=1024 --relocatable' failed (1)

which breaks the build.

Note: I don't need these .so right now, but the ffmpeg build system is not entirely following my --disable-shared configuration.

It looks like wasm-ld would benefit from supporting these flags for people compiling dynamic libraries.

(In my particular case I'll try to patch-up the build system though I'd appreciate release notes for stricter compiler changes.)

@kripken

This comment has been minimized.

Copy link
Member

commented Oct 2, 2019

Looks like fallout from the wasm-ld flag refactoring... adding to list of wasm backend blockers.

@kripken kripken added this to Blocker in LLVM Upstream Backend Oct 2, 2019
@dschuff

This comment has been minimized.

Copy link
Member

commented Oct 4, 2019

I don't think this is a blocker because it's not a regression from fastcomp, is it? AFAIK fastcomp only ever supported -s SIDE_MODULE?

@dschuff

This comment has been minimized.

Copy link
Member

commented Oct 4, 2019

Also, it's possible that the new dynamic linking model might not even have the concept of soname in the same sense that ELF does.

@kripken

This comment has been minimized.

Copy link
Member

commented Oct 4, 2019

I think this does build with fastcomp? In general ffmpeg has been known to compile there for a very long time. It just recently regressed. So I think this is both a regression compared to upstream and compared to fastcomp.

@sbc100

This comment has been minimized.

Copy link
Collaborator

commented Oct 7, 2019

Looks like this was fixed between 1.38.46 and 1.38.47. It should not longer appear with a more recent version.

@sbc100 sbc100 closed this Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
4 participants
You can’t perform that action at this time.