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

clang build error #14

Closed
maxmadzz opened this issue Jul 8, 2021 · 2 comments
Closed

clang build error #14

maxmadzz opened this issue Jul 8, 2021 · 2 comments

Comments

@maxmadzz
Copy link

maxmadzz commented Jul 8, 2021

make -j6 PREFIX=/usr LIBDIR=lib64 'CFLAGS=-fno-semantic-interposition -Wl,--gc-sections -ffunction-sections -fdata-sections -Os -pipe -march=native -fPIC -mavx2' 'LDFLAGS=-fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,-O2 -Wl,--as-needed' 'ARFLAGS= -rcs' all 
clang -fno-semantic-interposition -Wl,--gc-sections -ffunction-sections -fdata-sections -Os -pipe -march=native -fPIC -mavx2  -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,-O2 -Wl,--as-needed -I. -shared -fPIC -Wl,-soname,libopenaptx.so.0 -o libopenaptx.so.0.2.0 openaptx.c
clang -fno-semantic-interposition -Wl,--gc-sections -ffunction-sections -fdata-sections -Os -pipe -march=native -fPIC -mavx2  -I. -c -o openaptx.o openaptx.c
clang -fno-semantic-interposition -Wl,--gc-sections -ffunction-sections -fdata-sections -Os -pipe -march=native -fPIC -mavx2  -I. -c -o openaptxenc.o openaptxenc.c
clang -fno-semantic-interposition -Wl,--gc-sections -ffunction-sections -fdata-sections -Os -pipe -march=native -fPIC -mavx2  -I. -c -o openaptxdec.o openaptxdec.c
clang-12: warning: -Wl,--gc-sections: 'linker' input unused [-Wunused-command-line-argument]
clang-12: warning: -Wl,--gc-sections: 'linker' input unused [-Wunused-command-line-argument]
clang-12: warning: -Wl,--gc-sections: 'linker' input unused [-Wunused-command-line-argument]
rm -f libopenaptx.a
llvm-ar -rcs libopenaptx.a openaptx.o
clang -fno-semantic-interposition -Wl,--gc-sections -ffunction-sections -fdata-sections -Os -pipe -march=native -fPIC -mavx2 -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,-O2 -Wl,--as-needed -static -o openaptxenc.static openaptxenc.o libopenaptx.a
clang -fno-semantic-interposition -Wl,--gc-sections -ffunction-sections -fdata-sections -Os -pipe -march=native -fPIC -mavx2 -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,-O2 -Wl,--as-needed -static -o openaptxdec.static openaptxdec.o libopenaptx.a
ln -sf libopenaptx.so.0.2.0 libopenaptx.so.0
ln -sf libopenaptx.so.0 libopenaptx.so
clang -fno-semantic-interposition -Wl,--gc-sections -ffunction-sections -fdata-sections -Os -pipe -march=native -fPIC -mavx2 -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,-O2 -Wl,--as-needed -o openaptxenc openaptxenc.o libopenaptx.so
clang -fno-semantic-interposition -Wl,--gc-sections -ffunction-sections -fdata-sections -Os -pipe -march=native -fPIC -mavx2 -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,-O2 -Wl,--as-needed -o openaptxdec openaptxdec.o libopenaptx.so
ld.lld: error: undefined symbol: __unordtf2
>>> referenced by printf_fp.o:(__printf_fp_l) in archive /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../lib64/libc.a
>>> referenced by printf_fp.o:(__printf_fp_l) in archive /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../lib64/libc.a
>>> referenced by printf_fphex.o:(__printf_fphex) in archive /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../lib64/libc.a
>>> referenced 1 more times
>>> did you mean: __unorddf2
>>> defined in: /usr/lib/llvm/12/bin/../../../../lib/clang/12.0.0/lib/linux/libclang_rt.builtins-x86_64.a

ld.lld: error: undefined symbol: __letf2
>>> referenced by printf_fp.o:(__printf_fp_l) in archive /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../lib64/libc.a
>>> referenced by printf_fphex.o:(__printf_fphex) in archive /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../lib64/libc.a
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
ld.lld: error: undefined symbol: __unordtf2
>>> referenced by printf_fp.o:(__printf_fp_l) in archive /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../lib64/libc.a
>>> referenced by printf_fp.o:(__printf_fp_l) in archive /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../lib64/libc.a
>>> referenced by printf_fphex.o:(__printf_fphex) in archive /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../lib64/libc.a
>>> referenced 1 more times
>>> did you mean: __unorddf2
>>> defined in: /usr/lib/llvm/12/bin/../../../../lib/clang/12.0.0/lib/linux/libclang_rt.builtins-x86_64.a

ld.lld: error: undefined symbol: __letf2
>>> referenced by printf_fp.o:(__printf_fp_l) in archive /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../lib64/libc.a
>>> referenced by printf_fphex.o:(__printf_fphex) in archive /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../lib64/libc.a
make: *** [Makefile:90: openaptxenc.static] Error 1
make: *** Waiting for unfinished jobs....
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:90: openaptxdec.static] Error 1

@pali
Copy link
Owner

pali commented Jul 9, 2021

Try to recompile with command: make

@maxmadzz
Copy link
Author

Sorry, it is a problem with the clang tool chain.

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