-
Guest58
Hello? Is there a plague of silence here?
-
clapont
hi, everyone! I wish you a merry Happy Christmas! :-)
-
twobitsahead
I am attempting to port something to illumos (OpenIndiana) and having some trouble. The application depends on gcc13-libs-13.3.0. GCC 13 and its libraries are installed, yet there is still a warning about an unmet dependency on GCC 13
-
twobitsahead
I'm not especially familiar with porting nor porting to illumos. I have reached out to the developers of the application and have been directed to try to see if I can sort it out
-
twobitsahead
Would someone kindly give me a nudge as to which direction I should go in as far as troubleshooting at this point?
-
denk
twobitsahead: usually you should specify an additional run-path to the target binary, if I correctly understood your "trouble"
-
twobitsahead
The application is GHC. Per the GHC website, the package for GHC 7.2.2(?) should be available via the sfe repository. It appears as though it's not available anymore. I saw that GHC 9.8.2 is available on pkgin, so I used the bootstrap script from SmartOS to install pkgin on OI. Upon attempting to install GHC 9.8.2 via pkgin, a warning is produced
-
twobitsahead
which reads '... the following packages have unmet requirements: gcc13-libs-13.3.0'. After installing GHC anyways, I attempted to run it and it immediately throws an error reading 'ghc-9.8.2: internal error: timerfd_create: No such file or directory'. Immediately after this message is one which directs me to report it as a bug on the GHC site,
-
twobitsahead
which I already tried to do (and was directed to try changing the path or libraries)
-
twobitsahead
denk Is the additional run-path still applicable in this situation?
-
denk
see output of ldd ghc as first step
-
denk
does it contain the libraries?
-
denk
twobitsahead: I meant you compile something using gcc
-
twobitsahead
No. 'ldd ghc' returns 'unsupported or unknown file type'
-
denk
full path to the ghc binary
-
denk
find a correct binary of ghc-9.8.2 which produces the internal error
-
twobitsahead
denk It seems like compiling GHC via GCC isn't an option as it's a self hosted compiler
-
denk
if ghc is a staticaly linked it does not need any external libraries
-
twobitsahead
The full path to the ghc binary is /opt/local/bin (created via and for pkgin)
-
denk
inspect the building processif you cannot find the file and try to use LD_LIBRARY_PATH env variable to specify a path to the gcc13 libraries
-
denk
sorry, I have to go now, maybe next time...
-
twobitsahead
Thank you for some direction. I'll keep looking around
-
wacki
I highly recommend to not mix OI with packages from SFE as long as you are inexperienced.
-
wacki
You shouldn't mix the package systems without real necessity. I also recommend to not use pkgin or others. Start using the official build system we have.
-
wacki
Mixing different build systems is IMO generally a bad idea.
-
wacki
-
wacki
Our default gcc version is 14 at the moment btw.
-
twobitsahead
Thank you for the heads up
-
jbk
the timerfd_create error seems a bit strange -- that exists in libc
-
jbk
and has been there for a while (2004)
-
twobitsahead
I had wanted to try to (attempt to) port the latest version of GHC to OI. The pages on the GHC porting page mentioned that it is possible on both OI and other distros. The first mention of using the SFE repository is on their site. I checked for packages on the SFE and did not find any as their docs had suggested
-
twobitsahead
I am aware that, supposedly, OpenSolaris had a port of GHC. I haven't come across it as of yet
-
twobitsahead
Pkgin has the only GHC package I have found that I can get onto OI
-
iximeow
my read of that error message is that it's calling timerfd_create and getting an EEXIST somewhere along the way
-
iximeow
so twobitsahead in your shoes i'd be curious what truss says is happening in the program that's printing that (does the call to timerfd_create look reasonable?)
-
wacki
OI has its own build system (originating from OpenSolaris). It's similar to what is being used for Solaris 11.
-
jbk
the text ('No such file or directory') is basically strerror(ENOENT)
-
iximeow
oh ENOENT, right, sorry
-
jbk
the only thing I could think of is if it's trying to maybe use dlsym() on the wrong library??
-
wacki
If you don't use it you will sooner or later suffer from the consequences. Porting something to OI is twofold: 1. porting to illumos (that is, it's libc and and supporting libraries and tools) and 2. porting to OI's build system.
-
twobitsahead
iximeow I'm not experienced enough to understand the output to determine if it looks reasonable. If you wouldn't mind, I could create a pastebin with the output and share it
-
wacki
Different illumos distribuitions have different build systems; some use IPS for package management (eg. OI and OmniOS), some use others.
-
twobitsahead
Also, I should mention that the version of GHC that is broken is *not* the version I am trying to compile. The compiler is self-hosted and this older version should be used for compiling the latest version from source
-
iximeow
twobitsahead: wouldn't hurt, but i probably won't be able to help very much either. just thinking through some debugging steps out loud
-
iximeow
(good chance you're more familiar with packaging and porting than me :) )
-
twobitsahead
I reached out to the GHC devs on IRC and I was basically told to look at the paths and libraries. (the errors actually mention contacting their devs in regards to a bug fix)
-
wacki
If GHC needs itself to build you'll need to find a way to bootstrap it if you don't find an already working version of it for illumos. I haven't seen anything GHC related in illumos yet.
-
wacki
I don't recommend starting with such a big project; you should start with something simpler to get used to the libs and tools OI (or any other illumos based distro).
-
twobitsahead
I had hoped to use the pkgin ghc-9.8.2 to bootstrap the newer version. This seem(ed) like it would come down to making the ghc-9.8.2 aware of the gcc-13 libs
-
twobitsahead
I'm just spitballing ideas now, but maybe it's possible that pkgin is set up for SmartOS? And I should try bootstrapping on there first? (Thinking this, since I used the script on OI, after all)
-
twobitsahead
I should probably take your advice and start with a smaller project
-
jclulow
I suspect you ought to be able to use the pkgsrc GHC, FWIW
-
jclulow
I would imagine, though, that it's built against the GCC 13 libraries that come from pkgsrc though, so you might need to install those with pkgin
-
jclulow
I don't really know anything about Haskell though
-
iximeow
yeah that's why i was wondering about truss, because i don't think timerfd_create should even be able to return ENOENT so something seems weird there
-
iximeow
and tbh if timerfd_create *is* returning ENOENT that's a smaller project: updating docs :)
-
jclulow
It really shouldn't under normal conditions
-
jclulow
But: if it is, it's probably because /dev/timerfd doesn't exist
-
jclulow
timerfd_create() isn't a system call, it just opens a character device that implements the emulation
-
jclulow
If that device node doesn't exist though it feels like something else has previously gone pretty wrong
-
iximeow
ooooh
-
jclulow
There should be a symlink: /dev/timerfd -> ../devices/pseudo/timerfd@0:timerfd
-
jclulow
And then /devices/pseudo/timerfd@0:timerfd should be made available when you try to open it etc
-
jclulow
/usr/kernel/drv/amd64/timerfd is in one of the base packages though with other kernel bits so it's not like it won't have been installed
-
twobitsahead
Ok, gcc13-13.3.0 is in pkgin. Attempting to install the package gives a couple of dependency warnings;
-
twobitsahead
1. /usr/lib/amd64/libstdc++.so.6, needed by gcc13-13.3.0 is not present in this system.
-
twobitsahead
2. /usr/lib/amd64/libgcc_s.so.1, needed by gcc13-13.3.0 is not present in this system.
-
jclulow
If you "pkg search :path:/usr/lib/amd64/libgcc_s.so.1" it should hopefully list some packages that include that base OS file
-
jclulow
(I don't have an OI machine myself)
-
wacki
OI has several gcc versions. Their libs reside in /usr/gcc/<version>/lib
-
jclulow
Yes but there should be some base package delivering at least /usr/lib/amd64/libgcc_s.so.1
-
twobitsahead
Two results, library/gcc-12-compat-links⊙14 and library/gcc-10-compat-links⊙15
-
jclulow
Maybe give gcc-12-compat-links a go?
-
wacki
I have introduced the compat-links in the past.
-
jclulow
FWIW, /usr/lib/amd64/libgcc_s.so.1 is not really a "compat" thing
-
jclulow
It's something the base OS should include
-
wacki
It led to problems in the past. We have several gcc versions; which one should have its libs in /usr/lib and why?
-
jclulow
libgcc_s.so.1 has not lead to problems that anybody has ever been able to demonstrate to me. It's different from the C++ runtime, and is stable and backwards compatible. Just link in the latest one that's installed, using a mediator or whatever
-
jclulow
Or link in the one that illumos is currently being built with (e.g., 10, soon 14, etc)
-
jclulow
Either way
-
jclulow
It's fine to deliver the versioned artefacts under /usr/gcc/$version as well, the system really ought to provide the stable ones in the default rpath is all
-
wacki
Yes, somebody should provide a solution we can test and discuss.
-
twobitsahead
Where should libstdc++.so.* be?
-
jclulow
That one I'm less sure about, because it has indeed presented compat issues in the past
-
jclulow
I'm somewhat surprised that the gcc13-13.3.0 package depends on it though, to be honest, for that reason
-
jclulow
So I would probably try and get pkgin to ignore the issue
-
jclulow
and see what happens
-
twobitsahead
Ok, I tried to install gcc13-13.3.0 via pkgin. I jimmied the libgcc_s.so dependency, and pkgin is only complaining about the libstdc++.so dependency
-
twobitsahead
I attempted to proceed with the installation, ignoring that dependency on libstdc++.so, but the pkgin install command is immediately returning *without* installing gcc13-13.3.0, even after acknowledging the missing dependency
-
twobitsahead
Oddly enough, I managed to install GHC with its missing dependencies successfully. I'm not sure why pkgin isn't returning any errors but simply returning with no output. A cursory Google search isn't helping. I suppose I should inquire about this in the pkgin channels
-
twobitsahead
Found libstdc++.so.6 and placed it in the place where pkgin was looking for it. Pkgin installed gcc13-13.3.0 successfully