Giter Club home page Giter Club logo

Comments (7)

dufresnep avatar dufresnep commented on July 25, 2024

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.

laytan avatar laytan commented on July 25, 2024

LLVM/clang 18 is not supported yet

from odin.

dufresnep avatar dufresnep commented on July 25, 2024

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.

dufresnep avatar dufresnep commented on July 25, 2024

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.

dufresnep avatar dufresnep commented on July 25, 2024
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.

dufresnep avatar dufresnep commented on July 25, 2024

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.

dufresnep avatar dufresnep commented on July 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.