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

1.38.46-upstream regression on sdl2 build #9510

Closed
pmp-p opened this issue Sep 26, 2019 · 0 comments · Fixed by #9511
Closed

1.38.46-upstream regression on sdl2 build #9510

pmp-p opened this issue Sep 26, 2019 · 0 comments · Fixed by #9511
Assignees

Comments

@pmp-p
Copy link
Contributor

pmp-p commented Sep 26, 2019

just tested the new tag with : ./emsdk install --embedded 1.38.46-upstream
embuilder.py build --pic sdl2 gives strange messages now:

embuilder.py build --pic sdl2
embuilder:INFO: building and verifying sdl2
cache:INFO: generating port: libSDL2.a... (this will be cached in "/opt/sdk/emsdk-upstream/.emscripten_cache/wasm-obj-pic/libSDL2.a" for subsequent builds)
wasm-ld: error: -r and -pie may not be used together
wasm-ld: error: -r and -pie may not be used together
shared:ERROR: '/opt/sdk/emsdk-upstream/upstream/bin/wasm-ld -o /opt/sdk/emsdk-upstream/.emscripten_cache/wasm-obj-pic/ports-builds/sdl2/src/SDL_dataqueue.c.o --allow-undefined --lto-O0 /tmp/emscripten_temp_TjwJxW/SDL_dataqueue_0.o -L/opt/sdk/emsdk-upstream/upstream/emscripten/system/local/lib -L/opt/sdk/emsdk-upstream/upstream/emscripten/system/lib -L/opt/sdk/emsdk-upstream/.emscripten_cache/wasm-obj --import-memory --import-table -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --no-gc-sections --export-dynamic --export __wasm_call_ctors --export __data_end --export main --export malloc --export free --export setThrew --export __errno_location -pie -z stack-size=5242880 --initial-memory=16777216 --no-entry --max-memory=16777216 --relocatable' failed (1)
shared:ERROR: '/opt/sdk/emsdk-upstream/upstream/bin/wasm-ld -o /opt/sdk/emsdk-upstream/.emscripten_cache/wasm-obj-pic/ports-builds/sdl2/src/SDL_assert.c.o --allow-undefined --lto-O0 /tmp/emscripten_temp_tLAHBb/SDL_assert_0.o -L/opt/sdk/emsdk-upstream/upstream/emscripten/system/local/lib -L/opt/sdk/emsdk-upstream/upstream/emscripten/system/lib -L/opt/sdk/emsdk-upstream/.emscripten_cache/wasm-obj --import-memory --import-table -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --no-gc-sections --export-dynamic --export __wasm_call_ctors --export __data_end --export main --export malloc --export free --export setThrew --export __errno_location -pie -z stack-size=5242880 --initial-memory=16777216 --no-entry --max-memory=16777216 --relocatable' failed (1)
wasm-ld: error: -r and -pie may not be used together
shared:ERROR: '/opt/sdk/emsdk-upstream/upstream/bin/wasm-ld -o /opt/sdk/emsdk-upstream/.emscripten_cache/wasm-obj-pic/ports-builds/sdl2/src/SDL_error.c.o --allow-undefined --lto-O0 /tmp/emscripten_temp_UinHVE/SDL_error_0.o -L/opt/sdk/emsdk-upstream/upstream/emscripten/system/local/lib -L/opt/sdk/emsdk-upstream/upstream/emscripten/system/lib -L/opt/sdk/emsdk-upstream/.emscripten_cache/wasm-obj --import-memory --import-table -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --no-gc-sections --export-dynamic --export __wasm_call_ctors --export __data_end --export main --export malloc --export free --export setThrew --export __errno_location -pie -z stack-size=5242880 --initial-memory=16777216 --no-entry --max-memory=16777216 --relocatable' failed (1)
Traceback (most recent call last):
  File "/opt/sdk/emsdk-upstream/upstream/emscripten/emcc.py", line 3652, in <module>
    sys.exit(run(sys.argv))
  File "/opt/sdk/emsdk-upstream/upstream/emscripten/emcc.py", line 1907, in run
    compile_source_file(i, input_file)
  File "/opt/sdk/emsdk-upstream/upstream/emscripten/emcc.py", line 1889, in compile_source_file
    cmd = get_clang_command([input_file]) + ['-c', '-o', output_file]
  File "/opt/sdk/emsdk-upstream/upstream/emscripten/emcc.py", line 1860, in get_clang_command
    args = system_libs.process_args(args, shared.Settings)
  File "/opt/sdk/emsdk-upstream/upstream/emscripten/tools/system_libs.py", line 1620, in process_args
    args = port.process_args(Ports, args, settings, shared)
  File "/opt/sdk/emsdk-upstream/upstream/emscripten/tools/ports/sdl2.py", line 70, in process_args
    get(ports, settings, shared)
  File "/opt/sdk/emsdk-upstream/upstream/emscripten/tools/ports/sdl2.py", line 59, in get
    return [shared.Cache.get(libname, create, what='port')]
  File "/opt/sdk/emsdk-upstream/upstream/emscripten/tools/cache.py", line 133, in get
    temp = creator()
  File "/opt/sdk/emsdk-upstream/upstream/emscripten/tools/ports/sdl2.py", line 54, in create
    ports.run_commands(commands)
  File "/opt/sdk/emsdk-upstream/upstream/emscripten/tools/system_libs.py", line 1393, in run_commands
    run_commands(commands)
  File "/opt/sdk/emsdk-upstream/upstream/emscripten/tools/system_libs.py", line 73, in run_commands
    pool.map_async(run_build_command, commands, chunksize=1).get(999999)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 567, in get
    raise self._value
tools.shared.Py2CalledProcessError: Command '['/usr/bin/python2', '/opt/sdk/emsdk-upstream/upstream/emscripten/emcc.py', '-s', 'RELOCATABLE', '-Wno-int-in-bool-context', '/Users/user/.emscripten_ports/sdl2/SDL2-version_18/src/SDL_dataqueue.c', '-O2', '-o', '/opt/sdk/emsdk-upstream/.emscripten_cache/wasm-obj-pic/ports-builds/sdl2/src/SDL_dataqueue.c.o', '-I/opt/sdk/emsdk-upstream/.emscripten_cache/wasm-obj-pic/ports-builds/sdl2/include', '-O2', '-DUSING_GENERATED_CONFIG_H', '-w']' returned non-zero exit status 1
wasm-ld: error: -r and -pie may not be used together
shared:ERROR: '/opt/sdk/emsdk-upstream/upstream/bin/wasm-ld -o /opt/sdk/emsdk-upstream/.emscripten_cache/wasm-obj-pic/ports-builds/sdl2/src/SDL.c.o --allow-undefined --lto-O0 /tmp/emscripten_temp_lSK_yp/SDL_0.o -L/opt/sdk/emsdk-upstream/upstream/emscripten/system/local/lib -L/opt/sdk/emsdk-upstream/upstream/emscripten/system/lib -L/opt/sdk/emsdk-upstream/.emscripten_cache/wasm-obj --import-memory --import-table -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --no-gc-sections --export-dynamic --export __wasm_call_ctors --export __data_end --export main --export malloc --export free --export setThrew --export __errno_location -pie -z stack-size=5242880 --initial-memory=16777216 --no-entry --max-memory=16777216 --relocatable' failed (1)
shared:ERROR: embuilder: emcc command failed with 1: '/usr/bin/python2 /opt/sdk/emsdk-upstream/upstream/emscripten/emcc.py /tmp/tmpGWdUoM/src.cpp -s USE_SDL=2 -s RELOCATABLE -o /tmp/tmpGWdUoM/out.js'
user@pp /opt/sdk/emsdk-upstream $ wasm-ld: error: -r and -pie may not be used together
@sbc100 sbc100 self-assigned this Sep 26, 2019
sbc100 added a commit that referenced this issue Sep 26, 2019
Without `-c` emscripten will try to run lld on the object files its
given to produce another object file.  We should probably disable that
for the single build case.  This breakage was introduced in #9444 and
we should probably address it, but compiling without `-c` is also
broken so fixing here.

Fixes #9510
sbc100 added a commit that referenced this issue Sep 26, 2019
Without `-c` emscripten will try to run lld on the object files its
given to produce another object file.  We should probably disable that
for the single build case.  This breakage was introduced in #9444 and
we should probably address it, but compiling without `-c` is also
broken so fixing here.

Fixes #9510
belraquib pushed a commit to belraquib/emscripten that referenced this issue Dec 23, 2020
Without `-c` emscripten will try to run lld on the object files its
given to produce another object file.  We should probably disable that
for the single build case.  This breakage was introduced in emscripten-core#9444 and
we should probably address it, but compiling without `-c` is also
broken so fixing here.

Fixes emscripten-core#9510
iamahuman added a commit to iamahuman/emscripten that referenced this issue Jan 20, 2021


Remove the optimization (again) for the special case of single object
input, which skips the linker and directly copies the input object file
to output.

This behavior interferes with linking (merging) all objects in a
library archive into a single object, done with the following command:

    cc -o lib.o -r -Wl,--whole-archive lib.a

The optimization was once useful when no clear distinction was made
between compile mode and link-only mode.  It was also required for
compatibility (see emscripten-core#9510 and emscripten-core#9571).

However, emscripten-core#9510 was addressed by emscripten-core#9511, and emscripten-core#9600 introduced the '-r'
flag that allows to explicitly indicate linking to an object, making the
optimization less useful.
iamahuman added a commit to iamahuman/emscripten that referenced this issue Jan 20, 2021


Remove the optimization (again) for the special case of single object
input, which skips the linker and directly copies the input object file
to output.

This behavior interferes with linking (merging) all objects in a
library archive into a single object, done with the following command:

    cc -o lib.o -r -Wl,--whole-archive lib.a

The optimization was once useful when no clear distinction was made
between compile mode and link-only mode.  It was also required for
compatibility (see emscripten-core#9510 and emscripten-core#9571).

However, emscripten-core#9510 was addressed by emscripten-core#9511, and emscripten-core#9600 introduced the '-r'
flag that allows to explicitly indicate linking to an object, making the
optimization less useful.
iamahuman added a commit to iamahuman/emscripten that referenced this issue Jan 21, 2021


Remove the optimization (again) for the special case of single object
input, which skips the linker and directly copies the input object file
to output.

This behavior interferes with linking (merging) all objects in a
library archive into a single object, done with the following command:

    cc -o lib.o -r -Wl,--whole-archive lib.a

The optimization was once useful when no clear distinction was made
between compile mode and link-only mode.  It was also required for
compatibility (see emscripten-core#9510 and emscripten-core#9571).

However, emscripten-core#9510 was addressed by emscripten-core#9511, and emscripten-core#9600 introduced the '-r'
flag that allows to explicitly indicate linking to an object, making the
optimization less useful.
iamahuman added a commit to iamahuman/emscripten that referenced this issue Jan 21, 2021


Remove the optimization (again) for the special case of single object
input, which skips the linker and directly copies the input object file
to output.

This behavior interferes with linking (merging) all objects in a
library archive into a single object, done with the following command:

    cc -o lib.o -r -Wl,--whole-archive lib.a

The optimization was once useful when no clear distinction was made
between compile mode and link-only mode.  It was also required for
compatibility (see emscripten-core#9510 and emscripten-core#9571).

However, emscripten-core#9510 was addressed by emscripten-core#9511, and emscripten-core#9600 introduced the '-r'
flag that allows to explicitly indicate linking to an object, making the
optimization less useful.
iamahuman added a commit to iamahuman/emscripten that referenced this issue Jan 21, 2021


Remove the optimization (again) for the special case of single object
input, which skips the linker and directly copies the input object file
to output.

This behavior interferes with linking (merging) all objects in a
library archive into a single object, done with the following command:

    cc -o lib.o -r -Wl,--whole-archive lib.a

The optimization was once useful when no clear distinction was made
between compile mode and link-only mode.  It was also required for
compatibility (see emscripten-core#9510 and emscripten-core#9571).

However, emscripten-core#9510 was addressed by emscripten-core#9511, and emscripten-core#9600 introduced the '-r'
flag that allows to explicitly indicate linking to an object, making the
optimization less useful.
sbc100 pushed a commit that referenced this issue Jan 21, 2021
Remove the optimization (again) for the special case of single object
input, which skips the linker and directly copies the input object file
to output.

This behavior interferes with linking (merging) all objects in a
library archive into a single object, done with the following command:

    cc -o lib.o -r -Wl,--whole-archive lib.a

The optimization was once useful when no clear distinction was made
between compile mode and link-only mode.  It was also required for
compatibility (see #9510 and #9571).

However, #9510 was addressed by #9511, and #9600 introduced the '-r'
flag that allows to explicitly indicate linking to an object, making the
optimization less useful.
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

Successfully merging a pull request may close this issue.

2 participants