Comments (7)
Also happens when trying to run hello.odin:
paul@fedora:~/myodin/hello$ ls
hello hello.odin
paul@fedora:~/myodin/hello$ rm hello
paul@fedora:~/myodin/hello$ odin run .
clang: error: unsupported option '-arch' for target 'x86_64-redhat-linux-gnu'
paul@fedora:~/myodin/hello$
from odin.
LLVM/clang 18 is not supported yet
from odin.
I have tried on an other of my HD with Kubuntu.
Previously this morning, was on 23.10, and was working fine.
Now after update to 24.04 Beta... I got:
paul@rafulos:~/Odin$ make
./build_odin.sh debug
+ clang++ src/main.cpp src/libtommath.cpp -Wno-switch -Wno-macro-redefined -Wno-unused-value -DODIN_VERSION_RAW="dev-2024-04" -DGIT_SHA="caa8863c9" -std=c++14 -I/usr/lib/llvm-17/include -std=c++17 -fno-exceptions -funwind-tables -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -L/usr/lib/llvm-17/lib -g -pthread -lm -lstdc++ -ldl /usr/lib/llvm-17/lib/libLLVM-17.so -Wl,-rpath=$ORIGIN -o odin
+ set +x
clang: error: unsupported option '-arch' for target 'x86_64-pc-linux-gnu'
make: *** [Makefile:10: debug] Error 1
paul@rafulos:~/Odin$ odin report
Where to find more information and get into contact when you encounter a bug:
Website: https://odin-lang.org
GitHub: https://github.com/odin-lang/Odin/issues
Useful information to add to a bug report:
Odin: dev-2024-04:caa8863c9
OS: Ubuntu Noble Numbat (development branch), Linux 6.8.0-31-generic
CPU: Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz
RAM: 15861 MiB
Backend: LLVM 17.0.6
paul@rafulos:~/Odin$ clang --version
Ubuntu clang version 18.1.3 (1)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
paul@rafulos:~/Odin$
I realize I need to test with an older version of clang.
from odin.
Did:
sudo apt remove clang
git clean -dfx
paul@rafulos:~/Odin$ CC=clang++-17 make
./build_odin.sh debug
+ clang++ src/main.cpp src/libtommath.cpp -Wno-switch -Wno-macro-redefined -Wno-unused-value -DODIN_VERSION_RAW="dev-2024-04" -DGIT_SHA="caa8863c9" -std=c++14 -I/usr/lib/llvm-17/include -std=c++17 -fno-exceptions -funwind-tables -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -L/usr/lib/llvm-17/lib -g -pthread -lm -lstdc++ -ldl /usr/lib/llvm-17/lib/libLLVM-17.so -Wl,-rpath=$ORIGIN -o odin
./build_odin.sh: 121: clang++: not found
make: *** [Makefile:10: debug] Error 127
paul@rafulos:~/Odin$ whereis clang++-17
clang++-17: /usr/bin/clang++-17
paul@rafulos:~/Odin$
Is there an easy web to force the use of clang++-17 ?
from odin.
paul@rafulos:~/Odin$ git diff build_odin.sh
diff --git a/build_odin.sh b/build_odin.sh
index c53766290..f02c4242c 100755
--- a/build_odin.sh
+++ b/build_odin.sh
@@ -2,7 +2,7 @@
set -eu
: ${CPPFLAGS=}
-: ${CXX=clang++}
+: ${CXX=clang++-17}
: ${CXXFLAGS=}
: ${LDFLAGS=}
: ${LLVM_CONFIG=}
paul@rafulos:~/Odin$
paul@rafulos:~/Odin$ make
./build_odin.sh debug
+ clang++-17 src/main.cpp src/libtommath.cpp -Wno-switch -Wno-macro-redefined -Wno-unused-value -DODIN_VERSION_RAW="dev-2024-04" -DGIT_SHA="caa8863c9" -std=c++14 -I/usr/lib/llvm-17/include -std=c++17 -fno-exceptions -funwind-tables -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -L/usr/lib/llvm-17/lib -g -pthread -lm -lstdc++ -ldl /usr/lib/llvm-17/lib/libLLVM-17.so -Wl,-rpath=$ORIGIN -o odin
+ set +x
sh: 1: clang: not found
make: *** [Makefile:10: debug] Error 127
from odin.
With:
paul@rafulos:~/Odin$ file /usr/bin/clang
/usr/bin/clang: symbolic link to /usr/lib/llvm-17/bin/clang
paul@rafulos:~/Odin$ odin report
Where to find more information and get into contact when you encounter a bug:
Website: https://odin-lang.org
GitHub: https://github.com/odin-lang/Odin/issues
Useful information to add to a bug report:
Odin: dev-2024-04:caa8863c9
OS: Ubuntu Noble Numbat (development branch), Linux 6.8.0-31-generic
CPU: Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz
RAM: 15861 MiB
Backend: LLVM 17.0.6
paul@rafulos:~/Odin$
that works!
So it really seems to be linked to the use of clang version 18.
from odin.
I have been able to make Fedora 40 works with odin by:
git clean -fdx
paul@fedora:~/Odin$ git diff build_odin.sh
diff --git a/build_odin.sh b/build_odin.sh
index c53766290..43eba9797 100755
--- a/build_odin.sh
+++ b/build_odin.sh
@@ -2,10 +2,10 @@
set -eu
: ${CPPFLAGS=}
-: ${CXX=clang++}
+: ${CXX=clang++-17}
: ${CXXFLAGS=}
: ${LDFLAGS=}
-: ${LLVM_CONFIG=}
+: ${LLVM_CONFIG=/usr/lib64/llvm17/bin/llvm-config}
CPPFLAGS="$CPPFLAGS -DODIN_VERSION_RAW=\"dev-$(date +"%Y-%m")\""
CXXFLAGS="$CXXFLAGS -std=c++14"
paul@fedora:~/Odin$ ln -s /usr/lib64/llvm17/bin/clang ~/.local/bin/clang
then make
odin then report "badly" version 18.1.1
from odin.
Related Issues (20)
- Declaring proc that does nothing in defer block causes backend crash HOT 2
- or_else not compiling with function returning single bool or ptr value HOT 1
- `-vet-unused-variables` produces unnecessary errors when variable is used as a index HOT 8
- X11 bindings broken/annoying HOT 3
- Incorrect case selected in switch on Maybe(^T) HOT 2
- odin check fails to detect a type error HOT 1
- Segfault during type checking HOT 1
- Performing && or || on boolean arrays causes compiler to panic HOT 1
- "Maybe" assignment failing on struct initilization HOT 6
- Breaking from a loop in defer causes a compiler seg fault
- Suggest Slice Operator When Using [dynamic] on Polymorphic Type Parameter Looking for Slice
- A slice marked with @(rodata) can still be modified (and won't throw an error)
- When Accessing a Slice in an rodata struct, it can still be modified HOT 1
- @(rodata) doesn't work with slices of unions HOT 1
- Compiler crashes when building with spall HOT 4
- Compiler crashes on an array of values with different types, which has "using"
- Using all implicit swizzle fields on a array pointer causes CPP assertion.
- Syntax errors when declaring a multi-line procedure
- Problems with precision when using `linalg.angle_between`
- JSON Parsing Issue (Float field)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from odin.