nberth / ez-conf-lib Goto Github PK
View Code? Open in Web Editor NEWSimple generator of conf-<lib>.config files
License: GNU General Public License v3.0
Simple generator of conf-<lib>.config files
License: GNU General Public License v3.0
While trying to build dependencies of apron
using opam
, ez-conf-lib reports to have found gmp
library in an empty path and ends with an error:
# checking compilation with gcc: working
# looking for gmp without prefix
# include gmp.h: found in /nix/store/1fszsmhmlhbi4yzl2wgi08cfw0dng7pq-gmp-with-cxx-6.3.0-dev/include
# library gmp: found in
# error: unable to locate gmp library
Full log: https://gitlab.com/jasmin-lang/jasmin/-/jobs/6143092137
The sed
commands in lookup_lib
assume that the output of the compiler are in English. The script fails for other locales as it cannot extract the library path.
For instance, in a FR
locale, gcc -print-search-dirs
will give:
installés: /usr/lib/gcc/x86_64-pc-linux-gnu/13/
programmes: =/usr/libexec/gcc/x86_64-pc-linux-gnu/13/:/usr/libexec/gcc/x86_64-pc-linux-gnu/13/:/usr/libexec/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/13/:/usr/lib/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu/13/:/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/
bibliothèques: =/usr/lib/gcc/x86_64-pc-linux-gnu/13/:/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/lib/x86_64-pc-linux-gnu/13/:/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/lib/../lib64/:/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../x86_64-pc-linux-gnu/13/:/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64/:/lib/x86_64-pc-linux-gnu/13/:/lib/../lib64/:/usr/lib/x86_64-pc-linux-gnu/13/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../:/lib/:/usr/lib/
This may be related to #1 as the visible result is the same: include file found but library file not found.
Temporary work-around is LANG=C opam install mlgmpidl
.
Hello @nberth, first of all thanks for your work on those config scripts to smoothen out the dependency search for GMP when there's an opam package relying on it :)
It turns out that your work is very important since it happens to power, through the mlgmpidl
package, the generation of static binaries for the Mlang compiler (https://github.com/MLanguage/mlang/blob/master/mlang.opam#L27) used to produce the C code that levies the French income tax. Indeed, we want a compiler binary that runs free of any dynamic library dependency to be used in exotic mainframe environments, which is why we build GMP and MPFR ourselves with musl-gcc
: https://github.com/MLanguage/mlang/blob/724393abfa5854c96be9acd82c938c1565edb5c2/.github/workflows/binary-releases.yml#L104-L107.
As of recent changes in the dependencies of mlgmpidl
(related to #1 I think), this custom build of GMP used by mlgmpidl
is not recognized any more by the conf-gmp-paths
opam package and our pipeline fails : https://github.com/MLanguage/mlang/actions/runs/8203899486/job/22443015122#step:5:4685. We used to pass MPFR_PREFIX=/tmp/gmp-prefix GMP_PREFIX=/tmp/gmp-prefix
to our opam install . --deps-only
command but it looks like this way of communicating the custom lib directory of GMP and MPFR is not the way to do anymore.
Do you happen to know the way to communicate to conf-gmp-paths
, in a Linux environment, a custom lib directory for GMP and/or MPFR ?
Thank you very much for your help !
All Apron-dependent GitHub Actions jobs for Goblint fail during the build of this package with:
#=== ERROR while compiling ez-conf-lib.1 ======================================#
# context 2.1.5 | linux/x86_64 | ocaml-base-compiler.5.0.0 | git+https://github.com/ocaml/opam-repository.git
# path ~/work/analyzer/analyzer/_opam/.opam-switch/build/ez-conf-lib.1
# command ~/.opam/opam-init/hooks/sandbox.sh build sh -ecx sed -e 's_@@ez-conf-lib:lib@@_/home/runner/work/analyzer/analyzer/_opam/lib/ez-conf-lib_g' ez-conf-lib.config.in > ez-conf-lib.config
# exit-code 1
# env-file ~/.opam/log/ez-conf-lib-16891-b0399b.env
# output-file ~/.opam/log/ez-conf-lib-16891-b0399b.out
### output ###
# + sed -e s_@@ez-conf-lib:lib@@_/home/runner/work/analyzer/analyzer/_opam/lib/ez-conf-lib_g ez-conf-lib.config.in
# sed: -e expression #1, char 60: unknown option to `s'
(https://github.com/goblint/analyzer/actions/runs/7866405426/job/21460633443).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.