I try to make gunplot 5.0.0 under osx yosemite(10.10.4), and it comes with errors:
$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in config
make[2]: Nothing to be done for `all'.
Making all in m4
make[2]: Nothing to be done for `all'.
Making all in term
make[2]: Nothing to be done for `all'.
Making all in src
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in wxterminal
make[4]: Nothing to be done for `all'.
Making all in qtterminal
make[4]: Nothing to be done for `all'.
c++ -g -O2 -o gnuplot alloc.o axis.o breaders.o boundary.o color.o command.o contour.o datablock.o datafile.o dynarray.o eval.o external.o fit.o gadgets.o getcolor.o graph3d.o graphics.o help.o hidden3d.o history.o internal.o interpol.o libcerf.o matrix.o misc.o mouse.o multiplot.o parse.o plot.o plot2d.o plot3d.o pm3d.o readline.o save.o scanner.o set.o show.o specfun.o standard.o stats.o stdfn.o tables.o tabulate.o term.o time.o unset.o util.o util3d.o variable.o version.o -lreadline -lncurses -lz -llua -liconv
Undefined symbols for architecture x86_64:
"_luaL_checkint", referenced from:
_LUA_GP_int_error in term.o
_LUA_GP_int_warn in term.o
(maybe you meant: _luaL_checkinteger)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [gnuplot] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Seems like something related to lua. This is my lua env:
$ lua -v
Lua 5.3.0 Copyright (C) 1994-2015 Lua.org, PUC-Rio
I don't understand the make's output, please help!
It appears that the module/application you are compiling is not Lua 5.3-compatible. It uses luaL_checkint, but Lua 5.3 is using luaL_checkinteger. You need to update the module or use the compatibility switch LUA_COMPAT_APIINTCASTS (LUA_COMPAT_5_2 should work as well as it includes LUA_COMPAT_APIINTCASTS).
I had the same issue when using macports and trying to compile gnuplot (as a dependency for latex2rtf). In the end the fix was relatively straightforward...
In the version of gnuplot I needed (gnuplot-5.0.1), there are two references to luaL_checkint in the lua.trm file found in the term folder:
./term/lua.trm: t_num = luaL_checkint(L, 1);
./term/lua.trm: t_num = luaL_checkint(L, 1);
./term/lua.trm: token_cnt = luaL_checkinteger(L, 1);
Changing luaL_checkint to luaL_checkinteger did the trick. See Paul Kulchenko answer for the reason behind this compatibility issue.
Related
I'm trying to install libevent-2.0.12-stable on Centos, but when i type sudo make,error happens(I did ./configure before make):
/bin/sh ./libtool --tag=CC --mode=link gcc -g -O2 -Wall -fno-strict-aliasing -pthread -version-info 6:1:1 -release 2.0 -o libevent.la -rpath /usr/local/libevent-2.0.12-stable/lib event.lo evthread.lo buffer.lo bufferevent.lo bufferevent_sock.lo bufferevent_filter.lo bufferevent_pair.lo listener.lo bufferevent_ratelim.lo evmap.lo log.lo evutil.lo evutil_rand.lo strlcpy.lo select.lo poll.lo epoll.lo signal.lo event_tagging.lo http.lo evdns.lo evrpc.lo -lrt
libtool: link: gcc -shared -fPIC -DPIC .libs/event.o .libs/evthread.o .libs/buffer.o .libs/bufferevent.o .libs/bufferevent_sock.o .libs/bufferevent_filter.o .libs/bufferevent_pair.o .libs/listener.o .libs/bufferevent_ratelim.o .libs/evmap.o .libs/log.o .libs/evutil.o .libs/evutil_rand.o .libs/strlcpy.o .libs/select.o .libs/poll.o .libs/epoll.o .libs/signal.o .libs/event_tagging.o .libs/http.o .libs/evdns.o .libs/evrpc.o -lrt -O2 -pthread -pthread -Wl,-soname -Wl,libevent-2.0.so.5 -o .libs/libevent-2.0.so.5.1.1
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/librt.a(clock_gettime.o): relocation R_X86_64_PC32 against undefined symbol `__errno_location##GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libevent.la] Error 1
make[2]: Leaving directory `/home/lpchou/software/httpsqs/libevent-2.0.12-stable'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/lpchou/software/httpsqs/libevent-2.0.12-stable'
make: *** [all] Error 2
Can anyone help? Thanks.
Update
After i install libevent successfully with rpm package as mentioned by #KnudLarsen, i try to install tokyocabinet using make, however same error happens:
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libm.a(s_sin.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libm.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libtokyocabinet.so.9.10.0] Error 1
I tried methods in Recompiling with -fPIC, but doesn't work. It seems there lacks some dependent packages, for i just install libevent and tokyocabinet in another centos machine and everything works fine.
CentOS 6.8 - 64bits :
tokyocabinet-1.4.32 builds OK : libtokyocabinet.so.8.23.0, libtokyocabinet.a
tokyocabinet-1.4.48 is also OK : libtokyocabinet.so.9.11.0, libtokyocabinet.a
... So I guess you have to install / reinstall your build requirements for gcc :
yum reinstall gcc-c++ glibc-devel glibc-headers kernel-headers
... to have the right files /usr/lib64/ and /usr/include/.
? Which version of tokyocabinet are you trying to build ? And where did you get it ?
Because of old Das u-boot from HEAD branch that do not have gcc 5 yet, I am planning on using gcc 4.8 or 4.9 as a default compiler instead of 5.2.
GCC required virtual/libc glibc-2.22. glibc-2.22 complied successfully with 5.2. Unfortunately, it failed at do_compile with the error: ld: cannot find -lgcc with gcc 4.8 and 4.9
arm-poky-linux-gnueabi-gcc -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/yocto/hio-jethro/build-hio/tmp/sysroots/hio-imx6dl-board-tcbootstrap -nostdlib -nostartfiles -r -o /yocto/hio-jethro/build-hio/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/glibc/2.22-r0/build-arm-poky-linux-gnueabi/elf/librtld.map.o '-Wl,-(' /yocto/hio-jethro/build-hio/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/glibc/2.22-r0/build-arm-poky-linux-gnueabi/elf/dl-allobjs.os /yocto/hio-jethro/build-hio/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/glibc/2.22-r0/build-arm-poky-linux-gnueabi/libc_pic.a -lgcc '-Wl,-)' -Wl,-Map,/yocto/hio-jethro/build-hio/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/glibc/2.22-r0/build-arm-poky-linux-gnueabi/elf/librtld.mapT
/yocto/hio-jethro/build-hio/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi.gcc-cross-initial-arm/../../libexec/arm-poky-linux-gnueabi.gcc-cross-initial-arm/gcc/arm-poky-linux-gnueabi/5.2.0/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status
make[2]: *** [/yocto/hio-jethro/build-hio/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/glibc/2.22-r0/build-arm-poky-linux-gnueabi/elf/librtld.map] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/yocto/hio-jethro/build-hio/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/glibc/2.22-r0/git/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `/yocto/hio-jethro/build-hio/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/glibc/2.22-r0/git'
make: *** [all] Error 2
ERROR: oe_runmake failed
Am I looking at the right error? and How do I add -lgcc?
Edit:
I have checked with Fido Branch and everything is working fine. I might just need replace gcc and glibc with Fido's
How did you tell it to use GCC 4? The paths are still referencing 5.2.0, which suggests that you didn't change it correctly. The correct way to change GCC version is to set GCCVERSION, ie GCCVERSION="4.%".
Also u-boot in jethro supports gcc5 just fine, so why are you using an old release?
I have a next error when do make on zaz game on a linux mint 17.1 (Rebecca) with a drivers NVIDIA G98 GeForce 8400
make all-recursive
make[1]: Entering directory `/home/miguel/tmp/zaz-1.0.0'
Making all in po
make[2]: Entering directory `/home/miguel/tmp/zaz-1.0.0/po'
make[2]: Leaving directory `/home/miguel/tmp/zaz-1.0.0/po'
Making all in src
make[2]: Entering directory `/home/miguel/tmp/zaz-1.0.0/src'
g++ -g -O2 -o zaz main.o audiobuffer.o mixer.o oggsample.o scene.o settings.o wavesample.o streamingoggsample.o frame_events.o ogvexport.o bezier.o textureloader.o player.o level.o ballpath.o game.o editor.o mainmenu.o menu.o gameloop.o hiscores.o lineeditor.o tests.o profile.o directorylister.o levelset.o splash.o -lSDL -lvorbisfile -ltheoraenc -ltheoradec -logg -lftgl -lGL -lvorbisenc -lSDL_image
/usr/bin/ld: ogvexport.o: undefined reference to symbol 'vorbis_bitrate_addblock'
//usr/lib/i386-linux-gnu/libvorbis.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [zaz] Error 1
make[2]: Leaving directory `/home/miguel/tmp/zaz-1.0.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/miguel/tmp/zaz-1.0.0'
make: *** [all] Error 2
I Have installed lib vorbis
libvorbis-dbg:i386 install
libvorbis-dev:i386 install
libvorbis-ocaml install
libvorbis-ocaml-dev install
libvorbis0a:i386 install
libvorbisenc2:i386 install
libvorbisfile3:i386 install
libvorbisidec1 install
With other computer like same features not have a same problem, but the other computer don't have a nvidia card.
Thank for your help.
Tanks, I have resolv the problem change Makefile.ini after read this page:
https://www.mail-archive.com/debian-bugs-dist#lists.debian.org/msg1278320.html
I'm new to Mac and trying to build pkg-config-0.28 on OS X 10.8. I was able to configure successfully using:
./configure CC="gcc -arch i386 -arch x86_64" CXX="g++ -arch i386 -arch x86_64" CPP="gcc -E" CXXCPP="g++ -E" --with-internal-glib
I tried the "--with-internal-glib" after getting an error saying glib not found.
But now I'm getting the following error when I entered:
$ make -j8
Error message:
> CC gvarianttype.lo
CC gversion.lo
CC gwakeup.lo
CC gprintf.lo
CC glib-unix.lo
CC gthread-posix.lo
CC giounix.lo
gutils.c: In function 'find_folder':
gutils.c:1423: warning: 'FSFindFolder' is deprecated (declared at /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Folders.h:290)
CC gspawn.lo
echo > glib-public-headers.txt.tmp && mv glib-public-headers.txt.tmp glib-public-headers.txt
lipo: can't figure out the architecture type of: /var/folders/wn/zc31626x5mz7w57dq6cf8f7w0000gn/T//cczwFoWN.out
make[6]: *** [gvariant.lo] Error
make[6]: *** Waiting for unfinished jobs....
make[5]: *** [all-recursive] Error 1
make[4]: *** [all] Error 2
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Before that, I installed pkg-config-0.26 from a .pkg file but the problem is, it shows install successful but when I enter "pkg-config" in the terminal it says command not found. For this reason I thought of building from the latest release.
I really need this for building/compiling an opencv project. Now how I can get pkg-config to work? Please help.
I am trying to compile open MPI (release 1.5.4) from the source code on a Macbook Pro (OS X Lion) with Xcode 4.1 installed. I configure the openmpi with the following options;
../configure CFLAGS=-m64 CXXFLAGS=-m64 FFLAGS=-m64 FCFLAGS=-m64 --with-wrapper-cflags=-m64 --with-wrapper-cxxflags=-m64
in a new/clean directory. When I try make it gives me the following error;
Making all in otfprofile
CXX otfprofile-otfprofile.o
CXX otfprofile-CSVParse.o
CXX otfprofile-DataStructure.o
CXX otfprofile-Handler.o
CXX otfprofile-Prodtex.o
CXX otfprofile-Summary.o
CXXLD otfprofile
Undefined symbols for architecture x86_64:
"___builtin_expect", referenced from:
_main.omp_fn.0 in otfprofile-otfprofile.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[9]: *** [otfprofile] Error 1
make[8]: *** [all-recursive] Error 1
make[7]: *** [all-recursive] Error 1
make[6]: *** [all] Error 2
make[5]: *** [all-recursive] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [all] Error 2
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
I have gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00), gfortran GNU Fortran (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
I heard that I can use MacPorts for an easy installation but I want to compile it myself from the source. Can someone suggest me if I need to set some extra flags or what is causing this error? Please let me know if you need any further information. Thanks.
__builtin_expect is a gcc extension. I'd guess the clang/LLVM move from Apple doesn't support that but thinks it's gcc still.
There's a macro in OpenMPI which is set conditionally, but most likely incorrectly here. Since __builtin_expect is just an optimisation to hint about branch prediction you can probably fix the build by forcing the macro OMPI_CXX_HAVE_BUILTIN_EXPECT to be undefined during build.