benibela / xidel

Command line tool to download and extract data from HTML/XML pages or JSON-APIs, using CSS, XPath 3.0, XQuery 3.0, JSONiq or pattern matching. It can also create new or transformed XML/HTML/JSON documents.
http://www.videlibri.de/xidel.html
GNU General Public License v3.0
674 stars 42 forks source link

'Abort trap: 6' on macOS Catalina #94

Closed ernstki closed 1 year ago

ernstki commented 1 year ago

Hi, everyone. I'm trying to build the 0.9.8 tarball on macOS 10.15.7 (Catalina) to no avail.

I suspect (based on warnings running build.sh) that it's not xidel's problem, but a problem with my development setup, which is mostly based on MacPorts, but I do have the Xcode command line tools (2373) installed, so that's where the C compiler and linker are coming from.

I was, at one point, able to build this on another Catalina machine, so I just copied xidel and xidel.1 from that machine, and so I'm not totally stuck here. But it still seems like a good thing to try and resolve, in case somebody else finds themself in the same situation.

Here are as many details as I think might be relevant, including the standard error and standard output from invoking ./build.sh.

Note The .o files mentioned in the linker warnings are coming from the MacPorts version of Free Pascal. Seems like those should be harmless warnings anyway?

Standard error of ./build.sh on a freshly-extracted xidel-0.9.8.src.tar.gz

ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl/sysinit.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl/system.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl/objpas.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl/classes.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl/sysutils.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl/types.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl/typinfo.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl/rtlconsts.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl/errors.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl/unix.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl/unixtype.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl/baseunix.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl/sysconst.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl/unixutil.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl/initc.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl/sysctl.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl/ctypes.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl/math.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/fcl-base/contnrs.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl/dl.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/fcl-base/base64.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl-objpas/strutils.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/fcl-xml/xmlread.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/fcl-xml/xmlutils.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/fcl-xml/dtdmodel.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/fcl-xml/dom.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/fcl-xml/xmlreader.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/fcl-base/uriparser.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/fcl-xml/xmltextreader.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl/termio.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/fcl-process/process.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/fcl-process/pipes.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/fcl-json/jsonscanner.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/fcl-base/syncobjs.o) was built for newer macOS version (10.15) than being linked (10.9)ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl/dynlibs.o) was built for newer macOS version (10.15) than being linked (10.9)

ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl-extra/sockets.o) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/fcl-net/netdb.o) was built for newer macOS version (10.15) than being linked (10.9)

The standard out was too long to include in the issue description, so it's attached instead.

Expected result

$ ./build.sh
[lots of output]

$ ./xidel --version
Xidel 0.9.8

http://www.videlibri.de/xidel.html
by Benito van der Zander <benito@benibela.de>

Actual result

$ ./xidel --version
Abort trap: 6
benibela commented 1 year ago

Note The .o files mentioned in the linker warnings are coming from the MacPorts version of Free Pascal. Seems like those should be harmless warnings anyway?

I do not see any linker warnings

Abort trap: 6

That error could be anything

Run it with gdb, ltrace or strace to see what it is actually doing

ernstki commented 1 year ago

The linker warnings are under a <detail> in the issue description. Here is an example:

ld: warning: object file (/opt/local/libexec/fpc/lib/fpc/3.2.2/units/x86_64-darwin/rtl/sysinit.o) was built for newer macOS version (10.15) than being linked (10.9)

Using gdb was my first instinct, but gdb on macOS needs to be code-signed, and I couldn't get the one from MacPorts to work. (It hangs when I run --help and must be kill -9'd.) There is no strace on macOS; there is dtrace, but it's nowhere near as straightforward to use. Such is life outside the walled garden of Xcode, and I make no excuses for that.

If Abort trap: 6 could be "anything," I'll close this ticket. Thanks anyway. I have a workaround for now.

Regardless, Xidel is super-handy, and thanks for making it!