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.
Related
If I verify my gcc --version I get:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: arm64-apple-darwin21.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
And when I build with make after configure, I obtain the following error:
ld: warning: ignoring file /usr/local/Cellar/gcc/11.3.0_2/lib/gcc/11/libquadmath.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: in '/usr/local/Cellar/gcc/11.3.0_2/lib/gcc/11/libquadmath.0.dylib', building for macOS-x86_64 but attempting to link with file built for macOS-arm64
collect2: error: ld returned 1 exit status
make[8]: *** [libfgsl.la] Error 1
make[7]: *** [subdir-fgsl] Error 2
make[6]: *** [build-fgsl] Error 2
make[5]: *** [hd-std-all-subdirs] Error 2
make[4]: *** [all-subdirs] Error 2
make[3]: *** [hd-std-all] Error 2
make[2]: *** [all] Error 2
make[1]: *** [heacore] Error 2
make: *** [all] Error 2
Following the similar question here, I verified that
% ranlib --version
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: unknown option character `-' in: --version
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib [-sactfqLT] [-] archive [...]
(base) user#user BUILD_DIR % ranlib -version
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: unknown option character `v' in: -version
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib [-sactfqLT] [-] archive [...]
and that echo $PATH returns:
% echo $PATH
/usr/bin:/Users/username/opt/anaconda3/bin:/Users/username/opt/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin
I have followed similar questions and a) updated Cmake, b) attempted to edit CMAKE_OSX_ARCHITECTURES (but not found in cmake), and more.
Why is this happening and how to fix it?
EDIT: for env:
% env
TERM_PROGRAM=Apple_Terminal
SHELL=/bin/zsh
TERM=xterm-256color
TMPDIR=/var/folders/9x/gdg5j9sd4wx3q_v9f2pkrw6r0000gn/T/
TERM_PROGRAM_VERSION=445
TERM_SESSION_ID=C5417ED9-E4C8-411C-9CC3-18711A679E88
USER=username
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.nCSXSuYzna/Listeners
PATH=/usr/bin:/Users/username/opt/anaconda3/bin:/Users/username/opt/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin
am trying to compile erlang code using command 'make' on erlang.mk and getting the below error. i dont know where to go from here. am new to erlang.mk and erlang. am on ubuntu
Getting Xabber Web client .... done.
Copying Xabber Web files to 'priv' directory ........ done.
make[1]: Entering directory '/home/isachi2004/xabber-websocket
/deps/fast_xml'
cc -o priv/lib/fxml.so c_src/fxml.o -lexpat -L -lei -shared
/usr/bin/ld: cannot find -lexpat
collect2: error: ld returned 1 exit status
c_src/Makefile.erlang.mk:24: recipe for target 'priv/lib/fxml.so'
failed
make[2]: *** [priv/lib/fxml.so] Error 1
Makefile:25: recipe for target 'pre-app' failed
make[1]: *** [pre-app] Error 2
make[1]: Leaving directory '/home/isachi2004/xabber-websocket
/deps/fast_xml'
erlang.mk:4512: recipe for target 'deps' failed
make: *** [deps] Error 2
This error means that it cannot find the development files for the Expat library (an XML parser):
/usr/bin/ld: cannot find -lexpat
On Ubuntu, you could try installing it with:
sudo apt install libexpat1-dev
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.
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 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.