tpoechtrager / osxcross

Mac OS X cross toolchain for Linux, FreeBSD, OpenBSD and Android (Termux)
GNU General Public License v2.0
2.92k stars 329 forks source link

Apple M1 `build.sh` testing fails with-platform_version min version malformed: '10.9.0' #348

Open Jason2866 opened 2 years ago

Jason2866 commented 2 years ago

Tests do fail after successfull build

testing x86_64-apple-darwin21.4-clang++ -stdlib=libc++ -std=c++11 ... failed (ignored)

testing x86_64h-apple-darwin21.4-clang ... ld: -platform_version min version malformed: '10.9.0'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
failed (ignored)
testing x86_64h-apple-darwin21.4-clang++ ... ld: -platform_version min version malformed: '10.9.0'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
failed (ignored)

testing arm64-apple-darwin21.4-clang ... ld: -platform_version min version malformed: '11.0.0'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
failed (ignored)
testing arm64-apple-darwin21.4-clang++ ... ld: -platform_version min version malformed: '11.0.0'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
failed (ignored)

testing arm64e-apple-darwin21.4-clang ... ld: -platform_version min version malformed: '11.0.0'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
failed (ignored)
testing arm64e-apple-darwin21.4-clang++ ... ld: -platform_version min version malformed: '11.0.0'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
failed (ignored)

testing x86_64-apple-darwin21.4-clang ... ld: -platform_version min version malformed: '10.9.0'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

exiting with abnormal exit code (1)
run 'OCDEBUG=1 ./build.sh' to enable debug messages

Used environment

Building OSXCross toolchain, Version: 1.4

macOS SDK Version: 12.3, Target: darwin21.4
Minimum targeted macOS Version: 10.9
Tarball Directory: /Users/hans/Git/osxcross/tarballs
Build Directory: /Users/hans/Git/osxcross/build
Install Directory: /usr/local
SDK Install Directory: /usr/local/SDK

I added some of the open PRs to get the compile working. Changes can be seen in the fork Log

+ '[' 0 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ test_compiler x86_64h-apple-darwin21.4-clang /Users/hans/Git/osxcross/oclang/test.c
+ '[' '' '!=' required ']'
+ set +e
+ echo -ne 'testing x86_64h-apple-darwin21.4-clang ... '
testing x86_64h-apple-darwin21.4-clang ... + x86_64h-apple-darwin21.4-clang /Users/hans/Git/osxcross/oclang/test.c -O2 -Wall -o test
osxcross: debug: --> x86_64h-apple-darwin21.4-clang /Users/hans/Git/osxcross/oclang/test.c -O2 -Wall -o test 
osxcross: debug: <-- /usr/bin/clang (clang) -target x86_64h-apple-darwin21.4 -mlinker-version=609 -isysroot /usr/local/bin/../SDK/MacOSX12.3.sdk -cxx-isystem /usr/local/bin/../SDK/MacOSX12.3.sdk/usr/include/c++/v1 -mmacosx-version-min=10.9.0 -arch x86_64h /Users/hans/Git/osxcross/oclang/test.c -O2 -Wall -o test 
osxcross: debug: === time spent in wrapper: 0.07175 ms
ld: -platform_version min version malformed: '10.9.0'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
+ '[' 1 -eq 0 ']'
+ echo 'failed (ignored)'
failed (ignored)
+ '[' '' '!=' required ']'
+ set -e
+ test_compiler x86_64h-apple-darwin21.4-clang++ /Users/hans/Git/osxcross/oclang/test.cpp
+ '[' '' '!=' required ']'
+ set +e
+ echo -ne 'testing x86_64h-apple-darwin21.4-clang++ ... '
testing x86_64h-apple-darwin21.4-clang++ ... + x86_64h-apple-darwin21.4-clang++ /Users/hans/Git/osxcross/oclang/test.cpp -O2 -Wall -o test
osxcross: debug: --> x86_64h-apple-darwin21.4-clang++ /Users/hans/Git/osxcross/oclang/test.cpp -O2 -Wall -o test 
osxcross: debug: <-- /usr/bin/clang++ (clang++) -target x86_64h-apple-darwin21.4 -mlinker-version=609 -isysroot /usr/local/bin/../SDK/MacOSX12.3.sdk -stdlib=libc++ -nostdinc++ -Qunused-arguments -lc++ -cxx-isystem /usr/local/bin/../SDK/MacOSX12.3.sdk/usr/include/c++/v1 -mmacosx-version-min=10.9.0 -arch x86_64h /Users/hans/Git/osxcross/oclang/test.cpp -O2 -Wall -o test 
osxcross: debug: === time spent in wrapper: 0.054458 ms
ld: -platform_version min version malformed: '10.9.0'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
+ '[' 1 -eq 0 ']'
+ echo 'failed (ignored)'
failed (ignored)
+ '[' '' '!=' required ']'
+ set -e
+ echo ''

+ '[' 1 -eq 1 ']'
+ test_compiler arm64-apple-darwin21.4-clang /Users/hans/Git/osxcross/oclang/test.c
+ '[' '' '!=' required ']'
+ set +e
+ echo -ne 'testing arm64-apple-darwin21.4-clang ... '
testing arm64-apple-darwin21.4-clang ... + arm64-apple-darwin21.4-clang /Users/hans/Git/osxcross/oclang/test.c -O2 -Wall -o test
osxcross: debug: --> arm64-apple-darwin21.4-clang /Users/hans/Git/osxcross/oclang/test.c -O2 -Wall -o test 
osxcross: debug: <-- /usr/bin/clang (clang) -target arm64-apple-darwin21.4 -mlinker-version=609 -isysroot /usr/local/bin/../SDK/MacOSX12.3.sdk -cxx-isystem /usr/local/bin/../SDK/MacOSX12.3.sdk/usr/include/c++/v1 -mmacosx-version-min=10.16 -arch arm64 /Users/hans/Git/osxcross/oclang/test.c -O2 -Wall -o test 
osxcross: debug: === time spent in wrapper: 0.055417 ms
ld: -platform_version min version malformed: '11.0.0'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
+ '[' 1 -eq 0 ']'
+ echo 'failed (ignored)'
failed (ignored)
+ '[' '' '!=' required ']'
+ set -e
+ test_compiler arm64-apple-darwin21.4-clang++ /Users/hans/Git/osxcross/oclang/test.cpp
+ '[' '' '!=' required ']'
+ set +e
+ echo -ne 'testing arm64-apple-darwin21.4-clang++ ... '
testing arm64-apple-darwin21.4-clang++ ... + arm64-apple-darwin21.4-clang++ /Users/hans/Git/osxcross/oclang/test.cpp -O2 -Wall -o test
osxcross: debug: --> arm64-apple-darwin21.4-clang++ /Users/hans/Git/osxcross/oclang/test.cpp -O2 -Wall -o test 
osxcross: debug: <-- /usr/bin/clang++ (clang++) -target arm64-apple-darwin21.4 -mlinker-version=609 -isysroot /usr/local/bin/../SDK/MacOSX12.3.sdk -stdlib=libc++ -nostdinc++ -Qunused-arguments -lc++ -cxx-isystem /usr/local/bin/../SDK/MacOSX12.3.sdk/usr/include/c++/v1 -mmacosx-version-min=10.16 -arch arm64 /Users/hans/Git/osxcross/oclang/test.cpp -O2 -Wall -o test 
osxcross: debug: === time spent in wrapper: 0.058125 ms
ld: -platform_version min version malformed: '11.0.0'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
+ '[' 1 -eq 0 ']'
+ echo 'failed (ignored)'
failed (ignored)
+ '[' '' '!=' required ']'
+ set -e
+ echo ''

+ test_compiler arm64e-apple-darwin21.4-clang /Users/hans/Git/osxcross/oclang/test.c
+ '[' '' '!=' required ']'
+ set +e
+ echo -ne 'testing arm64e-apple-darwin21.4-clang ... '
testing arm64e-apple-darwin21.4-clang ... + arm64e-apple-darwin21.4-clang /Users/hans/Git/osxcross/oclang/test.c -O2 -Wall -o test
osxcross: debug: --> arm64e-apple-darwin21.4-clang /Users/hans/Git/osxcross/oclang/test.c -O2 -Wall -o test 
osxcross: debug: <-- /usr/bin/clang (clang) -target arm64e-apple-darwin21.4 -mlinker-version=609 -isysroot /usr/local/bin/../SDK/MacOSX12.3.sdk -cxx-isystem /usr/local/bin/../SDK/MacOSX12.3.sdk/usr/include/c++/v1 -mmacosx-version-min=10.16 -arch arm64e /Users/hans/Git/osxcross/oclang/test.c -O2 -Wall -o test 
osxcross: debug: === time spent in wrapper: 0.060542 ms
ld: -platform_version min version malformed: '11.0.0'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
+ '[' 1 -eq 0 ']'
+ echo 'failed (ignored)'
failed (ignored)
+ '[' '' '!=' required ']'
+ set -e
+ test_compiler arm64e-apple-darwin21.4-clang++ /Users/hans/Git/osxcross/oclang/test.cpp
+ '[' '' '!=' required ']'
+ set +e
+ echo -ne 'testing arm64e-apple-darwin21.4-clang++ ... '
testing arm64e-apple-darwin21.4-clang++ ... + arm64e-apple-darwin21.4-clang++ /Users/hans/Git/osxcross/oclang/test.cpp -O2 -Wall -o test
osxcross: debug: --> arm64e-apple-darwin21.4-clang++ /Users/hans/Git/osxcross/oclang/test.cpp -O2 -Wall -o test 
osxcross: debug: <-- /usr/bin/clang++ (clang++) -target arm64e-apple-darwin21.4 -mlinker-version=609 -isysroot /usr/local/bin/../SDK/MacOSX12.3.sdk -stdlib=libc++ -nostdinc++ -Qunused-arguments -lc++ -cxx-isystem /usr/local/bin/../SDK/MacOSX12.3.sdk/usr/include/c++/v1 -mmacosx-version-min=10.16 -arch arm64e /Users/hans/Git/osxcross/oclang/test.cpp -O2 -Wall -o test 
osxcross: debug: === time spent in wrapper: 0.072 ms
ld: -platform_version min version malformed: '11.0.0'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
+ '[' 1 -eq 0 ']'
+ echo 'failed (ignored)'
failed (ignored)
+ '[' '' '!=' required ']'
+ set -e
+ echo ''

+ test_compiler x86_64-apple-darwin21.4-clang /Users/hans/Git/osxcross/oclang/test.c required
+ '[' required '!=' required ']'
+ echo -ne 'testing x86_64-apple-darwin21.4-clang ... '
testing x86_64-apple-darwin21.4-clang ... + x86_64-apple-darwin21.4-clang /Users/hans/Git/osxcross/oclang/test.c -O2 -Wall -o test
osxcross: debug: --> x86_64-apple-darwin21.4-clang /Users/hans/Git/osxcross/oclang/test.c -O2 -Wall -o test 
osxcross: debug: <-- /usr/bin/clang (clang) -target x86_64-apple-darwin21.4 -mlinker-version=609 -isysroot /usr/local/bin/../SDK/MacOSX12.3.sdk -cxx-isystem /usr/local/bin/../SDK/MacOSX12.3.sdk/usr/include/c++/v1 -mmacosx-version-min=10.9.0 -arch x86_64 /Users/hans/Git/osxcross/oclang/test.c -O2 -Wall -o test 
osxcross: debug: === time spent in wrapper: 0.057875 ms
ld: -platform_version min version malformed: '10.9.0'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
+ _exit
+ EC=1
+ '[' 1 -ne 0 ']'
+ test -z build.sh
+ echo ''

+ echo 'exiting with abnormal exit code (1)'
exiting with abnormal exit code (1)
+ test -n 1
+ '[' -n cctools-port ']'
+ rm -f 'build/*_built_successfully'
+ echo ''

+ test build.sh = build.sh
+ check_for_bug_1242300
+ '[' -e /etc/issue ']'