cslarsen / jp2a

Converts jpg images to ASCII
GNU General Public License v2.0
805 stars 72 forks source link

Fedora 34: undefined reference to `rpl_malloc' while doing make -j #15

Closed nasseef20 closed 3 years ago

nasseef20 commented 3 years ago

jp2a is not available on the Fedora package repository. So I tried to build it from source using instructions from the README.md Building jpeglib worked fine. Then:

autoreconf -vi
./configure --with-jpeg-prefix=/usr/local \
            --with-curl-config=`which curl-config`

worked fine as well with no problems.

However make -j does not work, and this error shows up instead:

make  all-recursive
make[1]: Entering directory '/home/nasseef/jp2a'
Making all in src
make[2]: Entering directory '/home/nasseef/jp2a/src'
gcc  -g -O2  -L/usr/local//lib -o jp2a aspect_ratio.o html.o term.o curl.o jp2a.o options.o image.o  -ljpeg
/usr/bin/ld: image.o: in function `malloc_image':
/home/nasseef/jp2a/src/image.c:360: undefined reference to `rpl_malloc'
/usr/bin/ld: /home/nasseef/jp2a/src/image.c:361: undefined reference to `rpl_malloc'
/usr/bin/ld: /home/nasseef/jp2a/src/image.c:370: undefined reference to `rpl_malloc'
/usr/bin/ld: /home/nasseef/jp2a/src/image.c:364: undefined reference to `rpl_malloc'
/usr/bin/ld: /home/nasseef/jp2a/src/image.c:365: undefined reference to `rpl_malloc'
/usr/bin/ld: image.o:/home/nasseef/jp2a/src/image.c:366: more undefined references to `rpl_malloc' follow
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:335: jp2a] Error 1
make[2]: Leaving directory '/home/nasseef/jp2a/src'
make[1]: *** [Makefile:429: all-recursive] Error 1
make[1]: Leaving directory '/home/nasseef/jp2a'
make: *** [Makefile:327: all] Error 2
Talinx commented 3 years ago

You need to remove the line AC_FUNC_MALLOC from configure.ac. I also had to use sudo ldconfig /usr/local/lib so that it finds the libjpeg file. But I recommend using libjpeg-turbo from Fedora instead of installing libjpeg manually. Just install libjpeg-turbo-devel.

(jp2a is currently developed here if you want the latest version. Also requires libpng-devel and autoconf-archive.)