Issue |
117011
|
Summary |
"SPEC CPU2017 specspeed test suite" built with libomp.a static link fails to run.
|
Labels |
new issue
|
Assignees |
|
Reporter |
edisonchan
|
Device: vivo iQOO 12
OS: termux proot ubuntu 24.04
LLVM was installed with below step:
1. add repos:
deb http://apt.llvm.org/oracular/ llvm-toolchain-oracular-19 main
deb-src http://apt.llvm.org/oracular/ llvm-toolchain-oracular-19 main
2. install llvm-19
apt-get install libllvm-19-ocaml-dev libllvm19 llvm-19 llvm-19-dev llvm-19-doc llvm-19-examples llvm-19-runtime
apt-get install clang-19 clang-tools-19 clang-19-doc libclang-common-19-dev libclang-19-dev libclang1-19 clang-format-19 python3-clang-19 clangd-19 clang-tidy-19
apt-get install libclang-rt-19-dev
apt-get install lld-19
apt-get install libc++-19-dev libc++abi-19-dev
apt-get install libomp-19-dev
apt-get install flang-19
apt-get install libllvmlibc-19-dev
3. build openmp static libs:
git clone https://github.com/llvm/llvm-project.git
cd llvm-project
latest_version=$(git branch -a | grep release | grep -oE '[0-9]+\.x' | sort -t. -k1,1n -k2,2n | tail -n 1)
git checkout release/$latest_version
cd openmp
mkdir build
cd build
# setup INSTALLDIR
cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DLIBOMP_ENABLE_SHARED=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/lib/llvm-19 ..
make
make install
4. part of spec cpu2017 cfg:
```
default:
preENV_OMP_THREAD_LIMIT = 8
#preENV_GOMP_CPU_AFFINITY = 0-7
intrate,fprate:
copies = 1 # EDIT to change number of copies (see above)
intspeed,fpspeed:
threads = 8
# ENV_GOMP_CPU_AFFINITY = 0-7
default:
%ifdef %{no-numa}
submit = taskset -c 7 ${command}
%endif
default:
%ifndef %{llvm_dir}
% define llvm_dir "/usr/lib/llvm-19" # EDIT (see above)
%endif
preENV_LD_LIBRARY_PATH = %{llvm_dir}/lib:/usr/local/lib
default=base: # flags for all base
OPTIMIZE = -Ofast -march=armv8-a -static
intrate,intspeed=base: # flags for integer base
EXTRA_CFLAGS = -fno-strict-aliasing -fno-unsafe-math-optimizations -fno-finite-math-only -fgnu89-inline -fcommon
fprate,fpspeed=base:
EXTRA_CFLAGS += -fno-strict-aliasing
EXTRA_CXXFLAGS = -fno-finite-math-only
EXTRA_FFLAGS = #-fallow-argument-mismatch
```
5. runcpu -c llvm.cfg --noreportable -n 1 603
```
Running Benchmarks
Running 603.bwaves_s refspeed (ref) base llvm_19_1_aarch64-m64 threads:8 [2024-11-20 23:44:15]
603.bwaves_s: copy 0 non-zero return code (exit code=139, signal=0)
****************************************
Contents of bwaves_1.err
****************************************
/usr/lib/llvm-19/lib/libarcher.so: undefined symbol: RunningOnValgrind
Segmentation fault
****************************************
****************************************
Contents of speccmds.out
****************************************
specinvoke r4356
Invoked as: /home/edison/cpu2017/bin/specinvoke -d /home/edison/cpu2017/benchspec/CPU/603.bwaves_s/run/run_base_refspeed_llvm_19_1_aarch64-m64.0000 -f speccmds.cmd -q -e speccmds.err -o speccmds.stdout
timer ticks over every 1000 ns
Environment in effect for these runs:
# 1: COLORTERM=
# 2: BOOTCLASSPATH=/apex/com.android.art/javalib/core-oj.jar:/apex/com.android.art/javalib/core-libart.jar:/apex/com.android.art/javalib/okhttp.jar:/apex/com.android.art/javalib/bouncycastle.jar:/apex/com.android.art/javalib/apache-xml.jar:/system/framework/framework.jar:/system/framework/framework-graphics.jar:/system/framework/ext.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/tcmiface.jar:/system/framework/telephony-ext.jar:/system/framework/qcom.fmradio.jar:/system/framework/QPerformance.jar:/system/framework/UxPerformance.jar:/system/framework/WfdCommon.jar:/system/framework/vivo-framework.jar:/system/framework/vivo-media.jar:/system/framework/framework-adapter.jar:/system/framework/soc-framework.jar:/system/framework/vivo-vgcclient.jar:/system/framework/vivo-coworkclient.jar:/system/framework/vivo-emmclient.jar:/apex/com.android.i18n/javalib/core-icu4j.jar:/apex/com.android.adservices/javalib/framework-adservices.jar:/
apex/com.android.adservices/javalib/framework-sdksandbox.jar:/apex/com.android.appsearch/javalib/framework-appsearch.jar:/apex/com.android.configinfrastructure/javalib/framework-configinfrastructure.jar:/apex/com.android.conscrypt/javalib/conscrypt.jar:/apex/com.android.devicelock/javalib/framework-devicelock.jar:/apex/com.android.healthfitness/javalib/framework-healthfitness.jar:/apex/com.android.ipsec/javalib/android.net.ipsec.ike.jar:/apex/com.android.media/javalib/updatable-media.jar:/apex/com.android.mediaprovider/javalib/framework-mediaprovider.jar:/apex/com.android.ondevicepersonalization/javalib/framework-ondevicepersonalization.jar:/apex/com.android.os.statsd/javalib/framework-statsd.jar:/apex/com.android.permission/javalib/framework-permission.jar:/apex/com.android.permission/javalib/framework-permission-s.jar:/apex/com.android.scheduling/javalib/framework-scheduling.jar:/apex/com.android.sdkext/javalib/framework-sdkextensions.jar:/apex/com.android.tethering/javalib/framework-connectivity.jar:/a
pex/com.android.tethering/javalib/framework-connectivity-t.jar:/apex/com.android.tethering/javalib/framework-tethering.jar:/apex/com.android.uwb/javalib/framework-uwb.jar:/apex/com.android.virt/javalib/framework-virtualization.jar:/apex/com.android.wifi/javalib/framework-wifi.jar
# 3: OMP_THREAD_LIMIT=8
# 4: SHLVL=1
# 5: DEX2OATBOOTCLASSPATH=/apex/com.android.art/javalib/core-oj.jar:/apex/com.android.art/javalib/core-libart.jar:/apex/com.android.art/javalib/okhttp.jar:/apex/com.android.art/javalib/bouncycastle.jar:/apex/com.android.art/javalib/apache-xml.jar:/system/framework/framework.jar:/system/framework/framework-graphics.jar:/system/framework/ext.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/tcmiface.jar:/system/framework/telephony-ext.jar:/system/framework/qcom.fmradio.jar:/system/framework/QPerformance.jar:/system/framework/UxPerformance.jar:/system/framework/WfdCommon.jar:/system/framework/vivo-framework.jar:/system/framework/vivo-media.jar:/system/framework/framework-adapter.jar:/system/framework/soc-framework.jar:/system/framework/vivo-vgcclient.jar:/system/framework/vivo-coworkclient.jar:/system/framework/vivo-emmclient.jar:/apex/com.android.i18n/javalib/core-icu4j.jar
# 6: PATH=/home/edison/cpu2017/bin:/usr/lib/llvm-19/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/data/data/com.termux/files/usr/bin:/system/bin:/system/xbin
# 7: PWD=/home/edison/cpu2017
# 8: LC_LANG=C
# 9: PULSE_SERVER=127.0.0.1
#10: OMP_STACKSIZE=192M
#11: TMPDIR=/tmp
#12: SPECPERLLIB=/home/edison/cpu2017/bin/lib:/home/edison/cpu2017/bin
#13: SPECDB_PWD=/home/edison/cpu2017
#14: USER=edison
#15: SPEC=/home/edison/cpu2017
#16: ANDROID_DATA=/data
#17: ANDROID_ROOT=/system
#18: TERM=xterm
#19: HOME=/home/edison
#20: OLDPWD=/usr/lib/llvm-19/lib
#21: ANDROID_I18N_ROOT=/apex/com.android.i18n
#22: ANDROID_ART_ROOT=/apex/com.android.art
#23: ANDROID_TZDATA_ROOT=/apex/com.android.tzdata
#24: LC_ALL=C
#25: EXTERNAL_STORAGE=/sdcard
#26: _=/home/edison/cpu2017/bin/runcpu
#27: LANG=en_US.UTF-8
#28: LD_LIBRARY_PATH=/usr/lib/llvm-19/lib:/usr/local/lib
#29: MOZ_FAKE_NO_SANDBOX=1
#30: MALLOC_CONF=retain:true
#31: LIBC_FATAL_STDERR_=1
#32: OMP_NUM_THREADS=8
running commands in speccmds.cmd 1 times
runs started at 1732117455, 107689000, Wed Nov 20 23:44:15 2024
run 1 started at 1732117455, 108105000, Wed Nov 20 23:44:15 2024
child started: 0, 1732117455, 108269000, pid=22437, '../run_base_refspeed_llvm_19_1_aarch64-m64.0000/speed_bwaves_base.llvm_19_1_aarch64-m64 bwaves_1 < bwaves_1.in > bwaves_1.out 2>> bwaves_1.err'
child finished: 0, 1732117455, 125259000, sec=0, nsec=16990000, pid=22437, rc=35584
run 1 finished at: 1732117455, 125311000, Wed Nov 20 23:44:15 2024
run 1 elapsed time: 0, 017206000, 0.017206000
runs finished at 1732117455, 125543000, Wed Nov 20 23:44:15 2024
runs elapsed time: 0, 017854000, 0.017854000
error: a total of 1 children finished with errors
specinvoke exit: rc=0
****************************************
Invalid run; unable to continue.
If you wish to ignore errors please use '-I' or ignore_errors
The log for this run is in /home/edison/cpu2017/result/CPU2017.009.log
The debug log for this run is in /home/edison/cpu2017/result/CPU2017.009.log.debug
*
* Temporary files were NOT deleted; keeping temporaries such as
* /home/edison/cpu2017/result/CPU2017.009.log.debug and
* /home/edison/cpu2017/tmp/CPU2017.009
* (These may be large!)
*
runcpu finished at 2024-11-20 23:44:15; 29 total seconds elapsed
```
If remove the -staitc option, the test runs OK.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs