Repository navigation
Closed
Description
Hi,
I am unable to build the integration tests on macOS. Here is the full output:
(lp) ➜ integration_tests git:(main) ./run_tests.py
+ rm -rf /Users/benwibking/lpython/integration_tests/_lpython-tmp-test-llvm
+ rm -rf /Users/benwibking/lpython/integration_tests/_lpython-tmp-test-c
+ rm -rf /Users/benwibking/lpython/integration_tests/_lpython-tmp-test-wasm
+ rm -rf /Users/benwibking/lpython/integration_tests/_lpython-tmp-test-cpython
+ rm -rf /Users/benwibking/lpython/integration_tests/_lpython-tmp-test-x86
+ rm -rf /Users/benwibking/lpython/integration_tests/_lpython-tmp-test-wasm_x86
+ rm -rf /Users/benwibking/lpython/integration_tests/_lpython-tmp-test-wasm_x64
+ rm -rf /Users/benwibking/lpython/integration_tests/_lpython-tmp-test-c_py
+ rm -rf /Users/benwibking/lpython/integration_tests/_lpython-tmp-test-c_sym
+ rm -rf /Users/benwibking/lpython/integration_tests/_lpython-tmp-test-cpython_sym
+ rm -rf /Users/benwibking/lpython/integration_tests/_lpython-tmp-test-llvm_sym
+ rm -rf /Users/benwibking/lpython/integration_tests/_lpython-tmp-test-llvm_py
+ mkdir /Users/benwibking/lpython/integration_tests/_lpython-tmp-test-llvm
+ cmake -DKIND=llvm -DFAST=no -DPYTHON_LIBS_REQ=no ..
-- The C compiler identification is AppleClang 14.0.3.14030022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
Configuration results
---------------------
C compiler : /Library/Developer/CommandLineTools/usr/bin/cc
Build type: Debug
C compiler flags : -g
Installation prefix: /usr/local
KIND: llvm
FAST: no
PYTHON_LIBS_REQ: no
LPYTHON: /Users/benwibking/lpython/src/bin/lpython
LPYTHON_RTLIB_DIR: /Users/benwibking/lpython/src/libasr/runtime
LPYTHON_RTLIB_LIBRARY: /Users/benwibking/lpython/src/runtime/liblpython_runtime_static.a
-- Configuring done (0.4s)
CMake Error: CMake can not determine linker language for target: import_order_01
-- Generating done (0.1s)
CMake Generate step failed. Build files cannot be regenerated correctly.
Command failed: cmake -DKIND=llvm -DFAST=no -DPYTHON_LIBS_REQ=no ..
Metadata
Metadata
Assignees
Labels
No labels
Activity
certik commentedon Aug 10, 2023
Here is how it should look like (on Apple M1):
It looks quite similar. What cmake version do you have and did you install it using conda? I have "3.22.2".
Is your clang compiler working? I use the system version:
I think we use Clang for linking (for now).
You can also compare it against our macOS tests at the CI (which work) and see if you see any differences to your setup.
BenWibking commentedon Aug 10, 2023
I am also running on an M1. I installed CMake via Conda. However, I think I'm running on both a newer macOS version, a new Clang, and a newer CMake version:
certik commentedon Aug 10, 2023
I have:
It's possible that it is broken in a new version.
We would need to debug this, I don't know what can be causing this.
Smit-create commentedon Aug 11, 2023
Does the fix in https://github.com/lcompilers/lpython/pull/2266/files work for you?
Thanks for pointing this!
BenWibking commentedon Aug 11, 2023
Yes, that fixes this issue.
It still fails because
makeis hard-coded here, but I've setCMAKE_GENERATOR=Ninjain my environment. Usingcmake --build .instead would fix it.[-]integration tests fail to build on macOS[/-][+]integration tests fail to build with CMake 3.26[/+]BenWibking commentedon Aug 11, 2023
This will fix the build portability issue:
BenWibking commentedon Aug 11, 2023
9 tests fail on my system (using Python 3.11).
Edit: I've moved this to a new issue (#2267).