lewdlime / abcm2ps

abcm2ps is a command line program which converts ABC to music sheet in PostScript or SVG format. It is an extension of abc2ps which may handle many voices per staff. abcm2ps is Copyright © 2014-2016 Jean-Francois Moine.
http://moinejf.free.fr/
GNU General Public License v3.0
80 stars 31 forks source link

ld: error: undefined symbol: 8.14.1 -> 8.14.2 (and later) #113

Closed nunotexbsd closed 11 months ago

nunotexbsd commented 11 months ago

Clang15 FreeBSD amd64

I'm updating abcm2ps FreeBSD port to latest version. Build fails from 8.14.1 -> 8.14.2 and later with:

cc  -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -c abcm2ps.c -o abcm2ps.o
--- abcm2ps ---
cc -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -fstack-protector-strong abcm2ps.c -lm -o abcm2ps
ld: error: undefined symbol: error
>>> referenced by abcm2ps.c
>>>               /tmp/abcm2ps-541a2e.o:(include_file)
>>> referenced by abcm2ps.c
>>>               /tmp/abcm2ps-541a2e.o:(treat_file)
>>> referenced by abcm2ps.c
>>>               /tmp/abcm2ps-541a2e.o:(main)
>>> referenced 15 more times
>>> did you mean: ferror
>>> defined in: /lib/libc.so.7

ld: error: undefined symbol: tex_buf
>>> referenced by abcm2ps.c
>>>               /tmp/abcm2ps-541a2e.o:(treat_file)
>>> referenced by abcm2ps.c
>>>               /tmp/abcm2ps-541a2e.o:(treat_file)
>>> referenced by abcm2ps.c
>>>               /tmp/abcm2ps-541a2e.o:(treat_file)
>>> referenced 6 more times

ld: error: undefined symbol: frontend
>>> referenced by abcm2ps.c
>>>               /tmp/abcm2ps-541a2e.o:(treat_file)
>>> referenced by abcm2ps.c
>>>               /tmp/abcm2ps-541a2e.o:(treat_file)
>>> referenced by abcm2ps.c
>>>               /tmp/abcm2ps-541a2e.o:(main)
>>> referenced 3 more times

ld: error: undefined symbol: init_outbuf
>>> referenced by abcm2ps.c
>>>               /tmp/abcm2ps-541a2e.o:(main)
>>> referenced by abcm2ps.c
>>>               /tmp/abcm2ps-541a2e.o:(main)

ld: error: undefined symbol: set_format
>>> referenced by abcm2ps.c
>>>               /tmp/abcm2ps-541a2e.o:(main)

(...)

Any clues on how to fix?

Thanks

moinejf commented 11 months ago

Hi, If the command is only

cc -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -fstack-protector-strong abcm2ps.c -lm -o abcm2ps

this is normal: all the other objects are missing.

For the generation, you must use either 'make' or 'samu' (or 'ninja'). Please, have a look at the file INSTALL.

nunotexbsd commented 11 months ago

@moinejf Hi, port was using bsd make and fails. It's using gmake now. I've updated FreeBSD port to latest version.

https://cgit.freebsd.org/ports/commit/?id=6d0b73d0f8cdf84c182d1cf98ed76cff81bdc82c

Thanks