The build worked with that change thanks.
If you want more info on the environment, I am using this:
https://juliapackaging.github.io/BinaryBuilder.jl/stable/
Which is using these containers:
https://github.com/staticfloat/julia-docker/tree/master/crossbuild
The idea of this binary builder is to compile the library for several type of architecture
(e.g. Linux 64bits, windows, mac os), and then it hosts the binaries on a github release.
There is a `build_tarballs` script which build the binaries and put them in a tarball
which is hosted on github. Then installing the package depending on those binaries just
consists in downloading the assets and the user of the package does not have to deal with
compilation troubles.
I couldn't get it to work completely for Spot, it built everything fine but then I
couldn't use the python bindings (it cannot find the `libspot.so.0`) although the
library was compiled, I think it just a wrong file association/path.
If I look into spot_tarball/lib/pkgconfig/libspot.pc I see the following:
prefix=/workspace/destdir
exec_prefix=/workspace/destdir
includedir=/workspace/destdir/include
libdir=/workspace/destdir/lib
This workspace/destdir folder is from the docker container so it is non existent when one
wants to use the binaries on another machine.
I don't know if such set-up is desirable/possible.
Here are the binaries if you are interested in taking a look:
https://github.com/MaximeBouton/SpotBuilder/releases
Best,
Maxime
-----Original Message-----
From: Alexandre Duret-Lutz <aduret(a)gmail.com> On Behalf Of Alexandre Duret-Lutz
Sent: Saturday, November 10, 2018 12:58 AM
To: Maxime Bouton <boutonm(a)stanford.edu>
Cc: spot(a)lrde.epita.fr
Subject: Re: [Spot] Spot build fails
Maxime Bouton writes:
Hello,
I am trying to set up a automated build for Spot in a docker like environment. The build
errored during the `make` step. I have been able to run it fine on my machine, so I hope
it is just a dependency/version issue. Do you have any idea what dependency I could be
missing?
You do not miss anything secure_getenv() is not a portable function.
It's a GNU libc extension, but it seems Alpine Linux is using a different libc without
this function. Spot ships with a replacement implementation for secure_getenv() when it
is missing, but apparently tmpfile.cc does not include our replacement header for that.
Can you try running
sed -i 's/<cstdlib>/<stdlib.h>/' spot/misc/tmpfile.cc before make?
We received a similar report from a Cygwin user a few weeks ago, but he hasn't
confirmed whether the above change solves the problem or not.
Now if I can reproduce that problem with an Alpine Docker, I'll probably add that
configuration to our build farm. Is your Docker file available online?
I did not installed anything besides python3-dev and
got provided with an alpine linux distribution with gcc 7 already installed, this is the
configuration I have:
Configuration:
OS: Alpine Linux
Gcc --version: gcc (GCC) 7.1.0
G++ --version : g++ (GCC) 7.1.0
Clang --version: clang version 6.0.1
Spot source:
https://gitlab.lrde.epita.fr/spot/spot/-/jobs/21303/artifacts/download
(spot 2.6.3 dev)
If you want to automate the download of the the latest successful build (and not build
#21303), you can use this link
https://gitlab.lrde.epita.fr/spot/spot/-/jobs/artifacts/next/download?job=d…
The build script :
apk add python3-dev
cd $WORKSPACE/srcdir
unzip download
tar -xzf spot-2.6.3.dev.tar.gz
cd spot-2.6.3.dev
./configure --prefix=$prefix --host=${target}
Are you cross-compiling? What is the value of $target?