-
Notifications
You must be signed in to change notification settings - Fork 13
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
Ocaml #248
base: master
Are you sure you want to change the base?
Ocaml #248
Conversation
This class builds the OCAMLPATH wich is required by ocaml to find the dependencies. Also a helper to replace the fixed ocamlrun interpreter is provided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a chapter in doc/usage.rst
how Ocaml is supposed to be used? I managed to get a hello world compiled but then it depends on ocamlrun
. How does that come onto the target? When I tried to use ocamlopt
I got the following:
bash-5.2$ ocamlopt -o hello hello.ml -verbose
+ x86_64-bob_compat-linux-gnu-as -o 'hello.o' '/tmp/camlasmb63199.s'
sh: line 1: x86_64-bob_compat-linux-gnu-as: command not found
File "hello.ml", line 1:
Error: I/O error: x86_64-bob_compat-linux-gnu-as -o 'hello.o' '/tmp/camlasmb63199.s'
Apparently it needs the original host-toolchain
which leaves me a bit puzzled. Is this intended?
for j in $i/usr/lib/* ; do | ||
if [[ -d "$j" ]] ; then | ||
if [ -e "$j/META" ] ; then | ||
OCAMLPATH+="" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add an empty string?
./configure \ | ||
${AUTOCONF_BUILD:+--build=${AUTOCONF_BUILD}} \ | ||
${AUTOCONF_HOST:+--host=${AUTOCONF_HOST}} \ | ||
${AUTOCONF_TARGET:+--target=${AUTOCONF_TARGET}} \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AUTOCONF_TARGET
is not part of buildVars
. I guess you have never built a cross-compiler?
popd | ||
export PATH=${PATH}:$(pwd)/.bob | ||
|
||
./configure \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a particular reason why you do not use autotoolsBuild
? This applies to basically all packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes - because autotoolsBuild
is not working. Using autotoolsBuild
it fails with:
make: *** No targets specified and no makefile found. Stop.
The reason is, that configure
did not produce the makefiles in the current working directory, it's always in the folder of the configure script. - but autotoolsBuild
uses a build-folder where it runs configure
and assumes the makefiles to be generated.
To use the code from the autotools
-class I think we can either
- move the
configure
part of theautotools
- class into a separate class and reuse it from there - add a argument to
autotoolsBuild
skipping the pushd build
Do you see another option? Which one do you prefer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh my gosh! It's really that borken. 🤦 In this case I would rather not touch the autotools
class. But a small comment with exactly this explanation would be appreciated. Otherwise we'll start wondering again a couple of years down the road why the autotools
class isn't use...
|
||
checkoutSCM: | ||
scm: git | ||
url: [email protected]:hubert/opam.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NXDOMAIN
😉
I'm using this only for host-stuff ATM. In particular some required stuff for compiling mesa with intel drivers is in ocaml. I took a look in how to build a Ocaml cross compiler some months ago, but gave up as there I'll comment this but I don't want to spend time in building a ocaml cross compiler now - if this is ok for you? For further investigations: |
This is perfectly fine for me. We can add the cross-compiler support when its needed. But having some information in the docs about how this is supposed to be used is something that I indeed would want to have. Otherwise it is unusable by others, which would be a pity. We might also add some simple hello-world test in |
Depends on #247