Open KingDuckZ opened 4 years ago
I'll check next time I'm on Linux. If the latest LDC2 is installed, this sounds like tigersum
forgot about the rpath
to the library. But it should be part of the default compiler options in LDC2's config file (from our ebuild at least) to set rpath
correctly for newly compiled programs.
While the build process picked up LDFLAGS, it selects a D compiler by itself. I tried compiling with dmd-2_090
and it printed D compiler for the host machine: ldc2 (llvm 1.20.1 "LDC - the LLVM D compiler (1.20.1)
. See if there is a way to make the build process pick up the env vars set up in eclass/dlang.eclass
-> dlang_foreach_config()
. In particular DC
, but also DLANG_VENDOR
could be useful. Potentially also DLANG_LINKER_FLAG
in case of problems with linker arguments.
Now on to the issue with the rpath
. ebuild ... compile
results in a working binary, but as soon as I type ebuild ... install
the executable in the image path has the rpath
reference removed.
I think you may be hitting https://github.com/mesonbuild/meson/issues/6541
I'm a little bit new to ebuilds and it's very possible there are mistakes in my script. Anyways, just the other day I learned about the toolchain-funcs eclass which provides tc-export. Maybe it would be good if there was something equivalent to ensure the appropriate compiler is being used for D as well. That would fix the problem with meson defaulting to the wrong compiler I think. But if DC is already set then I don't understand, normally meson should honour it.
If the rpath problem is a bug I'll ask on IRC to see if there are known workarounds for it. Is my ebuild the first one to use meson btw?
Outside of third party overlays that have this one as a dependency and may or may not be using meson you are the first. Congrats to your new can of worms. There's many like it, but this one is yours. :)
Additional warnings/errors from repoman
:
ebuild.minorsyn 5
sys-apps/tigersum/tigersum-0.1.ebuild: line 26: Ebuild contains leading spaces
sys-apps/tigersum/tigersum-0.1.ebuild: line 27: Ebuild contains leading spaces
sys-apps/tigersum/tigersum-0.1.ebuild: line 28: Ebuild contains leading spaces
sys-apps/tigersum/tigersum-0.1.ebuild: line 29: Ebuild contains leading spaces
sys-apps/tigersum/tigersum-0.1.ebuild: line 30: Ebuild contains leading spaces
metadata.missing [fatal] 1
sys-apps/tigersum/metadata.xml
I wrote this ebuild which I'd like to contribute to this overlay:
The package is installing correctly but when I run
tigersum --help
I get this error:Any idea what the problem might be and how I could fix my ebuild?
I'm compiling with ldc