Opened 3 years ago
Closed 3 years ago
#64491 closed defect (fixed)
swi-prolog @8.4.1 install fails with segmentation fault
Reported by: | misc-activities | Owned by: | JanWielemaker (Jan Wielemaker) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.1 |
Keywords: | monterey | Cc: | |
Port: | swi-prolog |
Description
I have been trying to install swi-prolog but the build is failing and I get the following message:
Error: Failed to build swi-prolog: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_swi-prolog/swi-prolog/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port swi-prolog failed
In the main.log file, I found the following:
:info:build ninja: build stopped: subcommand failed. :info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_swi-prolog/swi-prolog/work/build" && ninja -j12 all -j12 -v :info:build Exit code: 1 :error:build Failed to build swi-prolog: command execution failed :debug:build Error code: CHILDSTATUS 89226 1 :debug:build Backtrace: command execution failed :debug:build while executing :debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring" :debug:build invoked from within :debug:build "command_exec -callback portprogress::target_progress_callback build" :debug:build (procedure "portbuild::build_main" line 8) :debug:build invoked from within :debug:build "$procedure $targetname"
When I ran ninja -j12 all -j12 -v manually in the build directory for swi-prolog, I got the following error:
[100/1480] cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_swi-prolog/swi-prolog/work/build/src && /opt/local/bin/cmake -E remove -f /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_swi-prolog/swi-prolog/work/build/home/boot.prc && /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_swi-prolog/swi-prolog/work/build/src/swipl -q -O -o /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_swi-prolog/swi-prolog/work/build/home/boot.prc -b /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_swi-prolog/swi-prolog/work/build/home/boot/init.pl FAILED: home/boot.prc /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_swi-prolog/swi-prolog/work/build/home/boot.prc cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_swi-prolog/swi-prolog/work/build/src && /opt/local/bin/cmake -E remove -f /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_swi-prolog/swi-prolog/work/build/home/boot.prc && /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_swi-prolog/swi-prolog/work/build/src/swipl -q -O -o /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_swi-prolog/swi-prolog/work/build/home/boot.prc -b /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_swi-prolog/swi-prolog/work/build/home/boot/init.pl /bin/sh: line 1: 91506 Segmentation fault: 11 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_swi-prolog/swi-prolog/work/build/src/swipl -q -O -o /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_swi-prolog/swi-prolog/work/build/home/boot.prc -b /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_swi-prolog/swi-prolog/work/build/home/boot/init.pl
Could you please let me know how I can get around this? Thanks!
Attachments (1)
Change History (9)
comment:1 Changed 3 years ago by reneeotten (Renee Otten)
Owner: | set to JanWielemaker |
---|---|
Port: | @8.4.1 removed |
Status: | new → assigned |
comment:2 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
And, since a crash occurred, attach the crash log.
comment:3 Changed 3 years ago by JanWielemaker (Jan Wielemaker)
The problem is caused by using tcmalloc which causes MacOS setlocale() to crash since MacOS 12 (Monterey). The swi-prolog-devel package already has a work-around for this (disable tcmalloc by setting the default for the cmake option USE_TCMALLOC
to OFF. This will be addressed for the stable version in 8.4.2.
Changed 3 years ago by misc-activities
comment:4 Changed 3 years ago by misc-activities
@JanWielemaker: I created a cmake alias as follows:
alias cmake='cmake -DUSE_TCMALLOC=OFF'
and tried to install again but still got the same error. Was what I did sensible or should I set the option some other way?
@reneeotten: I have attached the main.log file. It's for a newer run but the same error is produced.
@ryandesign: It looks like the crash log isn't generated. I searched the entire filesystem for .crash files. The only two that I found were from last year.
comment:5 Changed 3 years ago by misc-activities
I added the line 'configure.args-append -DUSE_TCMALLOC=OFF' in the cmake-1.0.tcl and cmake-1.1.tcl files and was able to get it to install. Is there a better way to temporarily set cmake options with MacPorts?
comment:6 Changed 3 years ago by JanWielemaker (Jan Wielemaker)
FYI, the swi-prolog-devel
port has been updated yesterday. This port already addresses this crash issues for a couple of minor releases. It now also addresses dependency on db53
which is broken on various MacOS versions. It uses db62
, which seems fine (so far).
Please test swi-prolog-devel
. There are no significant incompatibilities. We plan to update swi-prolog
to 8.4.2 in about a weeks time using the MacOS patches for swi-prolog-devel
.
comment:7 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | monterey added |
---|
comment:8 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
please add the complete
main.log
file mentioned in the error message