Opened 4 years ago

Closed 4 years ago

#61384 closed defect (fixed)

sbcl build failure 10.11

Reported by: dyne2meter Owned by: easye
Priority: Normal Milestone:
Component: ports Version: 2.6.3
Keywords: Cc: easieste@…, DaveStrickland (Dave Strickland)
Port: sbcl

Description

Sorry, folks! Another legacy system issue, but looks like it should be easy to fix.

:info:build /usr/bin/clang -g -Wall -Wundef -Wsign-compare -Wpointer-arith -O3 -g -Wall -O2 -fdollars-in-identifiers -mmacosx-version-min=10.11 -D_DARWIN_USE_64_BIT_INODE -arch x86_64 -fno-omit-frame-pointer -I.  -c -o runtime.o runtime.c
:info:build runtime.c:401:5: warning: implicit declaration of function 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration]
:info:build     clock_gettime(
:info:build     ^
:info:build runtime.c:405:9: error: use of undeclared identifier 'CLOCK_MONOTONIC'
:info:build         CLOCK_MONOTONIC
:info:build         ^
:info:build 1 warning and 1 error generated.
:info:build make: *** [runtime.o] Error 1
:info:build Command failed: SBCL_MACOSX_VERSION_MIN=10.11 CC=/usr/bin/clang CXX=/usr/bin/clang++ CPP=/usr/bin/cpp sh ./make.sh --fancy --prefix=/opt/local --xc-host="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_sbcl/sbcl/work/sbcl-1.2.11-x86-64-darwin/src/runtime/sbcl --core /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_sbcl/sbcl/work/sbcl-1.2.11-x86-64-darwin/output/sbcl.core --disable-debugger --sysinit /dev/null --userinit /dev/null" 
:info:build Exit code: 2
:error:build Failed to build sbcl: command execution failed
:debug:build Error code: NONE
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_sbcl/sbcl/main.log for details.

Attachments (3)

main.log.gz (9.6 KB) - added by dyne2meter 4 years ago.
main.log
sbcl-2.0.10-ElCapitan.tar.gz (4.5 KB) - added by tomio-arisaka (Tomio Arisaka) 4 years ago.
Portfile of SBCL-2.0.10 for macOS (El Capitan)
port_-vs_install_sbcl-2.0.10_log.tar.gz (41.7 KB) - added by tomio-arisaka (Tomio Arisaka) 4 years ago.
Log file of installing SBCL-2.0.10 on macOS-10.11 successfully

Download all attachments as: .zip

Change History (32)

Changed 4 years ago by dyne2meter

Attachment: main.log.gz added

main.log

comment:1 Changed 4 years ago by easye

Owner: set to easye
Status: newassigned

Thanks for keeping us honest!

I don't have direct access to macOS 10.11, so if someone has an easy patch, please get it to me which I can test under CI.

comment:2 Changed 4 years ago by dyne2meter

Does the following conversation help?

https://github.com/baresip/baresip/issues/347

alfredh says:

I added a compile-time check for clock_gettime with fallback to gettimeofday. I also have reports from other users about the build errors on some platforms.

HTH

comment:3 Changed 4 years ago by easye

<https://stackoverflow.com/questions/5167269/clock-gettime-alternative-in-mac-os-x>

says CLOCK_MONOTONIC was added in macos 10.12

<https://github.com/sbcl/sbcl/commit/8275edf75c2ec377569b3f6fcaaa86a965c185eb> constitutes the change using CLOCK_MONOTONIC

Unknown if the previous code path was retained: probably not so it will be to be resurrected.

comment:4 Changed 4 years ago by DaveStrickland (Dave Strickland)

Cc: DaveStrickland added

comment:5 Changed 4 years ago by dyne2meter

https://bugs.erlang.org/browse/ERL-256

Does this help at all? There's a lot of discouragement there concerning the break made in Sierra for those using older systems. Stuff related to what they say the SDK supports in 10.11 versus reality. Or something.

The discouragement is made plain, but some other ideas are floated. Just a vain hope, probably.

comment:6 Changed 4 years ago by easye

From feedback on #sbcl, the code for the 10.11 interface was removed. We’ll have to restore that functionality upstream, which would be easier for me to work on if I had access to 10.11. I still haven’t managed to find the time to set up macOS 10.11 under CI.

comment:7 Changed 4 years ago by kencu (Ken)

for most of these issues, the most expedient fix is to use the legacysupport PG, which adds the functionality in macports-legacy-support to older SDKs.

comment:8 Changed 4 years ago by easye

What is this legacy support PG you write of? I'm not familiar with using macports-legacy support for older SDKs.

comment:9 Changed 4 years ago by kencu (Ken)

It's a header-enhancing overlay with an additional linked-in library that supplies the commonly-needed bits to older SDKs. Using it in MacPorts is pretty easy, you add this:

PortGroup legacysupport 1.1

Using it outside MacPorts is pretty easy too.

Details at <https://github.com/macports/macports-legacy-support>.

comment:10 Changed 4 years ago by dyne2meter

Okay, I tried (naively) simply adding a line for the legacy-support PortGroup to the portfile, but the build fails with the same error on 10.11 platform. I'm not bitching about this because I really care about sbcl. Maxima has a dependency on sbcl. I don't want to try to convince maxima's port maintainer to switch the LISP system to ecl, which builds on my system without issues. I don't really know where to go from here, so somebody with more knowledge of the ports build system is going to have to step in. Why do I mention ecl? SageMath uses ecl to support maxima in their system and my build of SageMath from its makefile goes off without a hitch, even with the most current version. I can use Maxima in SageMath, but I am pushing this here on principle because I don't like to see my system progressively obsoleted deeper and deeper by stuff Apple is doing as a corporation. That said, I am perfectly happy to be told by the maintainer for this port that we have reached a dead end or that it's too much trouble to look farther.

Last edited 4 years ago by dyne2meter (previous) (diff)

comment:11 in reply to:  10 ; Changed 4 years ago by easye

Replying to dyne2meter:

[…] I don't want to try to convince maxima's port maintainer to switch the LISP system to ecl, which builds on my system without issues. I don't really know where to go from here, so somebody with more knowledge of the ports build system is going to have to step in. Why do I mention ecl? SageMath uses ecl to support maxima in their system and my build of SageMath from its makefile goes off without a hitch, even with the most current version. I can use Maxima in SageMath, but I am pushing this here on principle because I don't like to see my system progressively obsoleted deeper and deeper by stuff Apple is doing as a corporation. That said, I am perfectly happy to be told by the maintainer for this port that we have reached a dead end or that it's too much trouble to look farther.

Note that the lang/maxima contains a variant to use 'abcl' or 'clisp' both of which Maxima just fine. I'm pretty sure that the Maxima maintainer would be willing to add a variant for 'ecl' as well as opposed to moving the default off of 'sbcl'.

I'm not quite ready to declare 10.11 dead for sbcl. But I continue to not have a way to build/develop/test patches for that platform.

comment:12 in reply to:  10 Changed 4 years ago by kencu (Ken)

Replying to dyne2meter:

Okay, I tried (naively) simply adding a line for the legacy-support PortGroup to the portfile, but the build fails with the same error on 10.11 platform. I'm not bitching about this because I really care about sbcl. Maxima has a dependency on sbcl. I don't want to try to convince maxima's port maintainer to switch the LISP system to ecl, which builds on my system without issues. I don't really know where to go from here, so somebody with more knowledge of the ports build system is going to have to step in. Why do I mention ecl? SageMath uses ecl to support maxima in their system and my build of SageMath from its makefile goes off without a hitch, even with the most current version. I can use Maxima in SageMath, but I am pushing this here on principle because I don't like to see my system progressively obsoleted deeper and deeper by stuff Apple is doing as a corporation. That said, I am perfectly happy to be told by the maintainer for this port that we have reached a dead end or that it's too much trouble to look farther.

I would interested in SageMath ... I was wondering about a Portfile for it a short while ago, but the idea was shut down because someone had asked about it 12 years ago or something and it was felt to be too difficult back then.

I'll take a look at building sbcl on 10.11 if you want to share your experiences building SageMath on MacPorts...perhaps we can get a portfile for it working after all...

comment:13 in reply to:  11 Changed 4 years ago by kencu (Ken)

But I continue to not have a way to build/develop/test patches for that platform.

Using Parallels, I have VMs for every system from 10.5 to BigSur running on a 2010 MacPro, so that's quite easy to do.

Another method is to force MP to build against a 10.11 SDK using a 10.11 deployment target; you can do this on any system newer than the one you are targeting. You can also set up a whole installation of MP that way, using a custom prefix and setting it in macports.conf, if you like.

comment:14 Changed 4 years ago by dyne2meter

I don't recommend even thinking about porting SageMath. I had to install some basic stuff in Homebrew just to have the necessary build system. The SageMath config file hiccups as soon as it detects /opt/local/macports, not because the necessary components are there, but because too much Python stuff is there, I think. I needed a gcc10, which macports has, but so it goes. Now I have two installations of gcc10. Let's not even talk about what installing Julia duplicates, or threatens to if you are not careful.

The world of OSS math stuff is a free-for-all. No pun intended.

My build of SageMath failed without Homebrew gcc10, because something in building NumPy did not work correctly with the ancient factory installed Xcode build system. I think it would be great to see SageMath supported at MP. Maybe just tweaking the config file might work, but the source repo does not include a config. You have to issue "make config" first. I'm thinking, this will be hairy to port. I thought Sage is supposed to build its gcc if one is not found, but this did not happen for me.

SageMath is very tightly connected to a particular Python installation, I think.

Last edited 4 years ago by dyne2meter (previous) (diff)

comment:15 in reply to:  11 Changed 4 years ago by dyne2meter

Replying to easye:

Replying to dyne2meter:

[…] I don't want to try to convince maxima's port maintainer to switch the LISP system to ecl, which builds on my system without issues. I don't really know where to go from here, so somebody with more knowledge of the ports build system is going to have to step in. Why do I mention ecl? SageMath uses ecl to support maxima in their system and my build of SageMath from its makefile goes off without a hitch, even with the most current version. I can use Maxima in SageMath, but I am pushing this here on principle because I don't like to see my system progressively obsoleted deeper and deeper by stuff Apple is doing as a corporation. That said, I am perfectly happy to be told by the maintainer for this port that we have reached a dead end or that it's too much trouble to look farther.

Note that the lang/maxima contains a variant to use 'abcl' or 'clisp' both of which Maxima just fine. I'm pretty sure that the Maxima maintainer would be willing to add a variant for 'ecl' as well as opposed to moving the default off of 'sbcl'.

I'm not quite ready to declare 10.11 dead for sbcl. But I continue to not have a way to build/develop/test patches for that platform.

I like the idea about adding a maxima variant with ecl dependence, just to see how it goes. Truth: I know nothing about LISP. Should I just start a ticket free of any maxima issues?

Last edited 4 years ago by dyne2meter (previous) (diff)

Changed 4 years ago by tomio-arisaka (Tomio Arisaka)

Portfile of SBCL-2.0.10 for macOS (El Capitan)

comment:16 Changed 4 years ago by tomio-arisaka (Tomio Arisaka)

I love SBCL. So I modified a Portfile of SBCL-2.0.10 for macOS (El Capitan). Some patches are made up of "macports-legacy-support". (Thanks kencu for the info)

I attached "sbcl-2.0.10-ElCapitan.tar.gz" to this page.

If you are interested in it, please try. Of course, if I'm wrong, please let me know.

comment:17 Changed 4 years ago by dyne2meter

That's very generous of you Tomio, but sadly, your instructions are a little too elliptical to be useable at my paygrade. Will I open up the sbcl port itself, apply the patches to the appropriate files in that package, and then zip it back up again? I've just never tinkered with macports at this level before.

Last edited 4 years ago by dyne2meter (previous) (diff)

comment:18 Changed 4 years ago by tomio-arisaka (Tomio Arisaka)

Sorry that my previous comment is not user-friendly.

"sbcl-2.0.10-ElCapitan.tar.gz" contains a difference from current Portfile of SBCL. So unzip it and then copy the extracted files to your MacPorts directory as follows:

$ cd ${HOME}/Downloads

$ tar xf ./sbcl-2.0.10-ElCapitan.tar.gz 

$ cd ./sbcl-2.0.10-ElCapitan

$ sudo cp -ip ./Portfile $(port dir sbcl)

$ sudo cp -ip ./files/*.diff $(port dir sbcl)/files/

$ cd ..

After that, I think you will be able to install SBCL-2.0.10.

Thanks.

comment:19 Changed 4 years ago by dyne2meter

No, that did not work for me. Same error having to do with CLOCK_MONOTONIC. In other words, I ended up patching diddly-squat.

I put those files in what I thought was the right place in the /registry tree, so that I have ./files under the directory containing the Portfile, but this did not work after fixing the u and g permissions on them to root and wheel. I was located in the relevant directory under registry, and copied the files in from my Downloads directory where I unzipped the patch.

I get it that I'm whacking away at maintaining a legacy system, so I guess time's up for sbcl and ElCap and me. Thanks for trying to help.

Last edited 4 years ago by dyne2meter (previous) (diff)

comment:20 Changed 4 years ago by kencu (Ken)

Don't be too downhearted. If tomio got it working, we'll move it into macports. Just have to wait for someone to do a proper PR for it, or -- just do it. It might not be _today_ but ...

comment:21 Changed 4 years ago by dyne2meter

Thanks for the reply, kencu. I'm not downhearted because I couldn't make the patch work on my own. I'm downhearted because this is what Apple does to keep selling new systems and this change is as old as MacOS 10.12. It's a labor of love for me, with 12 or 13 year old hardware (refurbished in 2011-2012) and an obsolete OS, doing almost everything I ask it to do, and a lot of stuff I like doing that I probably can't do on newer systems even with updated software. Hangups like this one with sbcl are temporary annoyances, and I know the update will be fixed eventually. The larger upside is that Apple is not in my hair all the time with their this and that and their digital lifestyle.

comment:22 Changed 4 years ago by kencu (Ken)

I have four machines running Tiger PPC, and I just installed Octave 5.2 on one of them -- that is pretty new software for Tiger :> I must have 15 older Macs around here, all doing various useful things.

Short story -- there are lots of people around here in the same boat, and MacPorts is the place to be for this kind of support.

Last edited 4 years ago by kencu (Ken) (previous) (diff)

comment:23 Changed 4 years ago by dyne2meter

Indeed, this is the place to be for us. I sure remember years on Tiger, and running Classic without needing emulation. Riven! I think as recently as 2012, I had a G4 cube running Tiger, but I moved overseas and had to give up a lot of my old hardware. I had a couple of G5 tower systems in those days.

Very impressive, running Octave 5.2 on your Tiger system. No other way to do it, I figure. My oldest device is a MacBook that doesn't run anything beyond Snow Leopard. I've been running OS x since mid-2000, and went through all the early updates in real time, Jaguar, Panther, Tiger, Leopard, and 9 before that.

Changed 4 years ago by tomio-arisaka (Tomio Arisaka)

Log file of installing SBCL-2.0.10 on macOS-10.11 successfully

comment:24 Changed 4 years ago by tomio-arisaka (Tomio Arisaka)

I don't know why dyne2meter cannot install SBCL-2.0.10 on macOS-10.11. Probably my description is not good.

But my troubleshooting of SBCL is the following:

(1) After getting the build-error of SBCL, execute the next command in order to clean the working directory:

    sudo port clean sbcl

(2) Before editing the portfile of SBCL, execute the next command in order to reset the portfile of MacPorts:

    sudo port selfupdate

After that, I followed my previous comment.

Anyway, "port_-vs_install_sbcl-2.0.10_log.tar.gz" is attached to this page. It contains a log file when I installed SBCL-2.0.10 on macOS-10.11.

Last edited 4 years ago by tomio-arisaka (Tomio Arisaka) (previous) (diff)

comment:25 Changed 4 years ago by kencu (Ken)

I installed it too on El Cap.

I just need to tweak the patch a bit, and I'll push it thru.

comment:26 Changed 4 years ago by dyne2meter

Nope, this business about cleaning the sbcl and doing another selfupdate does not work for me. Obviously some data files somewhere else have gotten messed up.

I'll wait for the patch to become official. I've certainly had enough of this for now.

Last edited 4 years ago by dyne2meter (previous) (diff)

comment:27 Changed 4 years ago by kencu (Ken)

coming shortly. final tweaks to affected systems.

comment:29 Changed 4 years ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed

In e5b44a273814eb5a05f780bf9fc22f94d0f487a8/macports-ports (master):

sbcl: add CLOCK_REALTIME

using legacysupport directly did not work
possibly as this port does not use a
configure phase and seems to santize it's
environment during the build

so just patched it instead

closes: #61384

Note: See TracTickets for help on using tickets.