-
-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add default -I and -L paths for OpenBSD #4649
Conversation
What issue does this change aim to address, considering that
Additionally, other platforms in this script rely solely on Could you clarify the rationale behind this change? |
Ditto, never heard anyone say it doesn't build with the current settings, and it shouldn't need it. Are you perhaps confusing this build script with the actual Odin linking code? |
Hiya, Sorry, I should have explained why I was suggesting this. The symptom I'm trying to solve is that odin does not build on OpenBSD 7.6. [despereaux@polacre ~/build/Odin]$ git status
HEAD detached at origin/master
nothing to commit, working tree clean
[despereaux@polacre ~/build/Odin]$ git remote get-url origin
https://github.com/odin-lang/Odin.git
[despereaux@polacre ~/build/Odin]$ LLVM_CONFIG=/usr/local/llvm17/bin/llvm-config make release-native
./build_odin.sh release-native
+ clang++ src/main.cpp src/libtommath.cpp -Wno-switch -Wno-macro-redefined -Wno-unused-value -DODIN_VERSION_RAW="dev-2025-01" -DGIT_SHA="fdd3b46" -std=c++14 -I/usr/local/llvm17/include -std=c++17 -fno-exceptions -funwind-tables -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -L/usr/local/llvm17/lib -O3 -march=native -pthread -lm -lstdc++ -liconv -lLLVM -o odin
In file included from src/main.cpp:2:
In file included from src/common.cpp:68:
src/string.cpp:504:11: fatal error: 'iconv.h' file not found
#include <iconv.h>
^~~~~~~~~
1 error generated.
*** Error 1 in /home/despereaux/build/Odin (Makefile:19 'release-native')
[despereaux@polacre ~/build/Odin]$ uname -a
OpenBSD polacre 7.6 GENERIC.MP#338 amd64 (I have to use the OpenBSD llvm-17 package as 7.6 ships with llvm 16, which isn't supported by odin's build script) The problem is that [despereaux@polacre ~/build/Odin]$ llvm-config --cxxflags --ldflags
-I/usr/include -std=c++17 -fno-exceptions -fno-rtti -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-L/usr/lib so compiling odin would still fail. Fundamentally, If you just add the |
How about using the Admittedly, I’m not too familiar with how Odin is configured and built, but this seems like a more flexible and maintainable solution.
Just to be sure; does it work with |
I agree that the I understand the aversion though, and ultimately it's the the Odin project's call as to if it's acceptable or not. Either way I'll be keeping the diff on my local branch because I find it useful. Indeed the problem does persist with llvm-17, as the prefix paths for |
Yes, you are right, given that third-party software gets installed to My apologies! |
These can be added manually via environment variables when building, but it's probably sensible to have them as default on OpenBSD.