Opened 3 years ago
Last modified 3 years ago
#63093 new defect
msort 8.53: fixing install by disabling iwidgets itcl dep & running patched old Makefile.am
Reported by: | vike2000 | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | msort |
Description (last modified by vike2000)
I don't know if I'm correct in creating this ticket as I'm doing.
Please forgive any annoying language / formatting.
I tried to summarise my steps for a successful install
in the ticket summary,
but I give you a full trace of my steps from problem to solution:
-
sudo port install msort
…
Getting given an initial error:grep 'configure:.* error:' '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_itcl/itcl/work/itcl3.4/config.log'
configure:2138: error: C compiler cannot create executables
- (Examining some MacPorts configure/C-compiler options.)
- Finding ticket:44829#comment:9 mentioning itcl is "included in MacPorts' tcl".
Also, above that, a question:is msort now effectively a dead twig on the port tree?
- Patching the iwidgets Portfile to remove the itcl dep
-
(a) tarballs vs. (b) local
a b 21 21 22 22 checksums ${name}${version}.tar.gz md5 0e9c140e81ea6015b56130127c7deb03 23 23 24 depends_build port:tk port:itcl24 depends_build port:tk 25 25 26 26 build.args CPPFLAGS=-I${prefix}/include 27 27
-
-
sudo port install msort
…
Getting given a secondary errorgrep -B1 'error: use of undeclared identifier' /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_msort/msort/main.log|grep -Ev '\^|--'
:info:build In file included from /opt/local/include/uninum/uninum.h:19: :info:build /opt/local/include/gmp.h:1743:33: error: use of undeclared identifier 'UINT_MAX' :info:build /opt/local/include/gmp.h:1754:33: error: use of undeclared identifier 'ULONG_MAX' :info:build /opt/local/include/gmp.h:1765:33: error: use of undeclared identifier 'USHRT_MAX'
- Finding a highly relevant comment before a debian bugreport getting fixed:
The problem is that by default Automake adds "
.
" to the include path
(which is a pretty dumb idea IMO), and that msort has a header named
"limits.h"
. So now when GMP requests<limits.h>
, the msort's one gets
included, instead of the system-wide one. Of course, the msort's header
doesn't define UINT_MAX and friends, hence the error.
Adding "
nostdinc
" to AUTOMAKE_OPTIONS in Makefile.am and then
regenerating Makefile.in should fix the bug.
--
Jakub Wilkmsort-*/info.c
with an#include <limits.h>
,
and having also seen-I. -I. -I.
in themake
output of theclang
runs,
I'm realizing this could be the solution:(I'm working in a local repo)(k=1 && p=msort && d=$p-8.53 && s=sudo\ -u\ macports && sp=sudo\ port && (((!k))||($sp clean $p && $sp extract $p)) && cd $($sp work $p)/$d && $s perl -i -pe$'s/^(AUTOMAKE_OPTIONS =.*?)( nostdinc)?(.*?)$/\\1 nostdinc\\3/' Makefile.am && $s automake) # automake is macports'
Getting given a tertiary error:
… configure.ac:4: error: version mismatch. This is Automake 1.16.3, configure.ac:4: but the definition used by this AM_INIT_AUTOMAKE configure.ac:4: comes from Automake 1.9.6. You should recreate configure.ac:4: aclocal.m4 with aclocal and run automake again. …Noting the error: version mismatch.
- Following a superuser.com/questions/383580/how-to-install-autoconf-automake... (cause a websearch didn't give me whether/how I could use something other than the intuitive
port install automake @1.9.6
for that older version)Unknown if needed but I got this all working with it installed as well:(b=automake && v=1.9.6 && n="$b"-"$v" && a=$n.tar.gz && cd /tmp && ([[ -a $a ]]||curl -OL http://ftpmirror.gnu.org/"$b"/"$a") && rm -rf "$n" && tar -xzf "$a" && cd "$n" && ./configure && make && sudo make install)
(b=autoconf && v=2.59 && n="$b"-"$v" && a=$n.tar.gz && cd /tmp && ([[ -a $a ]]||curl -OL http://ftpmirror.gnu.org/"$b"/"$a") && rm -rf "$n" && tar -xzf "$a" && cd "$n" && ./configure && make && sudo make install)
- Finalizing, I can do a stream-patched variant of
port install msort
Some warnings can be fixed by also running autoconf, but this is not needed for(k=1 && p=msort && d=$p-8.53 && s=sudo\ -u\ macports && sp=sudo\ port && (((!k))||($sp clean $p && $sp extract $p)) && cd $($sp work $p)/$d && $s perl -i -pe$'s/^(AUTOMAKE_OPTIONS =.*?)( nostdinc)?(.*?)$/\\1 nostdinc\\3/' Makefile.am && $s /usr/local/bin/automake && $sp install $p)
install
(k=1 && p=msort && d=$p-8.53 && s=sudo\ -u\ macports && sp=sudo\ port && (((!k))||($sp clean $p && $sp extract $p)) && cd $($sp work $p)/$d && $s perl -i -pe$'s/^(AUTOMAKE_OPTIONS =.*?)( nostdinc)?(.*?)$/\\1 nostdinc\\3/' Makefile.am && $s /usr/local/bin/autoupdate && $s /usr/local/bin/aclocal && $s /usr/local/bin/autoconf && $s /usr/local/bin/automake && $sp install $p)
- Making use of the custom-installed (above)
/usr/local/bin/automake
(old version 1.9.6)
I doubt any effort on my side to take this all the way through into themacports-ports
repo will be fruitful.
I have only used this
install
of msort for something equivalent to...|msort -qjl -ta -o= -cN -tz -o= -cN|...
.
Also please note that I haven't run any further testing on the implications on removing the iwidgets dep on itcl.
Btw:
port version uname -a
Version: 2.6.2 Darwin [redacted] 17.7.0 Darwin Kernel Version 17.7.0: Mon Aug 31 22:11:23 PDT 2020; root:xnu-4570.71.82.6~1/RELEASE_X86_64 x86_64
(I have now done port selfupdate
for Version: 2.7.1)
Hope I haven't overlooked anything.
Thanks to any linked resources, anyone who takes interest in this and of course the MacPorts project in general.
Peace,
vike
Change History (2)
comment:1 Changed 3 years ago by vike2000
Description: | modified (diff) |
---|
comment:2 Changed 3 years ago by vike2000
Description: | modified (diff) |
---|