04:18:38 Hello? Is there a plague of silence here? 11:58:44 hi, everyone! I wish you a merry Happy Christmas! :-) 17:36:28 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 17:38:33 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 17:39:14 Would someone kindly give me a nudge as to which direction I should go in as far as troubleshooting at this point? 17:43:48 twobitsahead: usually you should specify an additional run-path to the target binary, if I correctly understood your "trouble" 17:46:27 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 17:46:27 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, 17:46:28 which I already tried to do (and was directed to try changing the path or libraries) 17:48:15 denk Is the additional run-path still applicable in this situation? 17:48:22 see output of ldd ghc as first step 17:48:39 does it contain the libraries? 17:49:34 twobitsahead: I meant you compile something using gcc 17:49:41 No. 'ldd ghc' returns 'unsupported or unknown file type' 17:50:01 full path to the ghc binary 17:50:56 find a correct binary of ghc-9.8.2 which produces the internal error 17:52:06 denk It seems like compiling GHC via GCC isn't an option as it's a self hosted compiler 17:53:02 if ghc is a staticaly linked it does not need any external libraries 17:53:25 The full path to the ghc binary is /opt/local/bin (created via and for pkgin) 17:54:35 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 17:57:24 sorry, I have to go now, maybe next time... 17:57:48 Thank you for some direction. I'll keep looking around 18:20:24 I highly recommend to not mix OI with packages from SFE as long as you are inexperienced. 18:21:21 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. 18:22:03 Mixing different build systems is IMO generally a bad idea. 18:23:00 Start here: https://docs.openindiana.org/dev/userland/ 18:23:29 Our default gcc version is 14 at the moment btw. 18:27:45 Thank you for the heads up 18:28:31 the timerfd_create error seems a bit strange -- that exists in libc 18:29:40 and has been there for a while (2004) 18:29:58 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 18:30:27 I am aware that, supposedly, OpenSolaris had a port of GHC. I haven't come across it as of yet 18:31:09 Pkgin has the only GHC package I have found that I can get onto OI 18:31:15 my read of that error message is that it's calling timerfd_create and getting an EEXIST somewhere along the way 18:31:39 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?) 18:32:42 OI has its own build system (originating from OpenSolaris). It's similar to what is being used for Solaris 11. 18:33:08 the text ('No such file or directory') is basically strerror(ENOENT) 18:33:29 oh ENOENT, right, sorry 18:34:10 the only thing I could think of is if it's trying to maybe use dlsym() on the wrong library?? 18:34:12 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. 18:34:43 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 18:36:07 Different illumos distribuitions have different build systems; some use IPS for package management (eg. OI and OmniOS), some use others. 18:36:30 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 18:37:00 twobitsahead: wouldn't hurt, but i probably won't be able to help very much either. just thinking through some debugging steps out loud 18:37:39 (good chance you're more familiar with packaging and porting than me :) ) 18:37:40 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) 18:41:04 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. 18:43:04 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). 18:46:50 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 18:48:17 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) 18:49:22 I should probably take your advice and start with a smaller project 18:52:27 I suspect you ought to be able to use the pkgsrc GHC, FWIW 18:53:08 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 18:53:25 I don't really know anything about Haskell though 18:54:27 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 18:54:42 and tbh if timerfd_create *is* returning ENOENT that's a smaller project: updating docs :) 18:55:15 It really shouldn't under normal conditions 18:55:30 But: if it is, it's probably because /dev/timerfd doesn't exist 18:55:55 timerfd_create() isn't a system call, it just opens a character device that implements the emulation 18:56:42 If that device node doesn't exist though it feels like something else has previously gone pretty wrong 18:57:19 ooooh 18:57:45 There should be a symlink: /dev/timerfd -> ../devices/pseudo/timerfd@0:timerfd 18:58:03 And then /devices/pseudo/timerfd@0:timerfd should be made available when you try to open it etc 18:59:39 /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 19:00:03 Ok, gcc13-13.3.0 is in pkgin. Attempting to install the package gives a couple of dependency warnings; 19:00:27 1.   /usr/lib/amd64/libstdc++.so.6, needed by gcc13-13.3.0 is not present in this system. 19:00:50 2. /usr/lib/amd64/libgcc_s.so.1, needed by gcc13-13.3.0 is not present in this system. 19:01:51 If you "pkg search :path:/usr/lib/amd64/libgcc_s.so.1" it should hopefully list some packages that include that base OS file 19:02:30 (I don't have an OI machine myself) 19:02:52 OI has several gcc versions. Their libs reside in /usr/gcc//lib 19:03:14 Yes but there should be some base package delivering at least /usr/lib/amd64/libgcc_s.so.1 19:03:19 Two results, library/gcc-12-compat-links⊙14 and library/gcc-10-compat-links⊙15 19:03:34 Maybe give gcc-12-compat-links a go? 19:04:08 I have introduced the compat-links in the past. 19:04:35 FWIW, /usr/lib/amd64/libgcc_s.so.1 is not really a "compat" thing 19:04:40 It's something the base OS should include 19:05:30 It led to problems in the past. We have several gcc versions; which one should have its libs in /usr/lib and why? 19:06:19 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 19:06:43 Or link in the one that illumos is currently being built with (e.g., 10, soon 14, etc) 19:06:44 Either way 19:08:39 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 19:09:09 Yes, somebody should provide a solution we can test and discuss. 19:19:53 Where should libstdc++.so.* be? 19:23:32 That one I'm less sure about, because it has indeed presented compat issues in the past 19:23:58 I'm somewhat surprised that the gcc13-13.3.0 package depends on it though, to be honest, for that reason 19:24:10 So I would probably try and get pkgin to ignore the issue 19:24:14 and see what happens 19:50:37 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 19:51:49 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 19:54:17 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 20:08:23 Found libstdc++.so.6 and placed it in the place where pkgin was looking for it. Pkgin installed gcc13-13.3.0 successfully