When trying to install Qt on OSX (10.11) via homebrew with the --universal option
brew install qt --universal
I get the following error:
clang: error: invalid Xarch argument: '-Xarch_i386 -framework', options requiring arguments are unsupported
clang: error: invalid Xarch argument: '-Xarch_i386 -framework', options requiring arguments are unsupported
make[4]: *** [../../../../plugins/phonon_backend/libphonon_qt7.dylib] Error 1
make[3]: *** [release] Error 2
make[2]: *** [sub-qt7-make_default] Error 2
make[1]: *** [sub-phonon-make_default] Error 2
make: *** [sub-plugins-make_default-ordered] Error 2
Any idea on how to fix that?
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
I am trying to install eigen with CMake. Following the CMake command, bottom of the output shows:
-- Configuring incomplete, errors occurred!
The highlights of the CMakeError.log are below.
Normally, google gets me an answer pretty quick but I having trouble with this one.
Anyone have any ideas?
c++: error: unrecognized command line option '-Wshorten-64-to-32'
make[1]: Leaving directory `/home/localadmin/apps/eigen/eigen-eigen-5a0156e40feb/build/CMakeFiles/CMakeTmp'
make[1]: *** [CMakeFiles/cmTryCompileExec4154354821.dir/src.cxx.o] Error 1
make: *** [cmTryCompileExec4154354821/fast] Error 2
c++: error: unrecognized command line option '-Wenum-conversion'
make[1]: Leaving directory `/home/localadmin/apps/eigen/eigen-eigen-
5a0156e40feb/build/CMakeFiles/CMakeTmp'
make[1]: *** [CMakeFiles/cmTryCompileExec362406516.dir/src.cxx.o] Error 1
make: *** [cmTryCompileExec362406516/fast] Error 2
c++: error: unrecognized command line option '-Wc++11-extensions'
make[1]: *** [CMakeFiles/cmTryCompileExec2110565347.dir/src.cxx.o] Error 1
make[1]: Leaving directory `/home/localadmin/apps/eigen/eigen-eigen-5a0156e40feb/build/CMakeFiles/CMakeTmp'
make: *** [cmTryCompileExec2110565347/fast] Error 2
c++: error: unrecognized command line option '-wd981'
make[1]: Leaving directory `/home/localadmin/apps/eigen/eigen-eigen-
5a0156e40feb/build/CMakeFiles/CMakeTmp'
make[1]: *** [CMakeFiles/cmTryCompileExec1208176884.dir/src.cxx.o] Error 1
make: *** [cmTryCompileExec1208176884/fast] Error 2
c++: error: unrecognized command line option '-wd2304'
make[1]: Leaving directory `/home/localadmin/apps/eigen/eigen-eigen-
5a0156e40feb/build/CMakeFiles/CMakeTmp'
make[1]: *** [CMakeFiles/cmTryCompileExec853725866.dir/src.cxx.o] Error 1
make: *** [cmTryCompileExec853725866/fast] Error 2
c++: error: unrecognized command line option '-strict-ansi'
make[1]: Leaving directory `/home/localadmin/apps/eigen/eigen-eigen-
5a0156e40feb/build/CMakeFiles/CMakeTmp'
make[1]: *** [CMakeFiles/cmTryCompileExec2089588030.dir/src.cxx.o] Error 1
make: *** [cmTryCompileExec2089588030/fast] Error 2
c++: error: unrecognized command line option '-Qunused-arguments'
make[1]: Leaving directory `/home/localadmin/apps/eigen/eigen-eigen-
5a0156e40feb/build/CMakeFiles/CMakeTmp'
make[1]: *** [CMakeFiles/cmTryCompileExec226858210.dir/src.cxx.o] Error 1
make: *** [cmTryCompileExec226858210/fast] Error 2
Compiling the Fortran compiler identification source file
"CMakeFortranCompilerId.F" failed.
Compiler: CMAKE_Fortran_COMPILER-NOTFOUND
Build flags:
Id flags: -c
sudo apt-get install gfortran, as valiano suggested in the comments, fixed the issue.
I am trying to install a debugger called Valgrind on OSX 10.11.2.
While running make, I get the following error
Undefined symbols for architecture i386:
"___ctzdi2", referenced from:
_doRegisterAllocation in libvex-x86-darwin.a(libvex_x86_darwin_a-host_generic_reg_alloc2.o)
ld: symbol(s) not found for architecture i386
make[3]: *** [memcheck-x86-darwin] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Do you know how to fix this?
This may or may not work for you, as I am operating in the following environment:
OS X 10.11.2,
Xcode 7.3.1
Custom built GCC 6.2.0 from source (which I am using instead of Xcode's clang compiler)
The following patch file applied to valgrind-3.12.0:
https://gist.github.com/milljm/22e40e723fb9faf201b83197fc23b4a1
I received the same error as OP, until I used the following extra configure argument:
./configure --enable-only64bit
I am trying to build GCC on a core2-apple-darwin12.3.0 i386 machine. The configure seems to go through without problems but when I invoke 'make' it returns an error.
In file included from ./kinds.h:75:0,
from /gcc-4.8.0/libgfortran/libgfortran.h:232,
from /gcc-4.8.0/libgfortran/fmain.c:4:
/gcc-4.8.0/libgfortran/kinds-override.h:40:5: error: #error "Where has __float128 gone?"
# error "Where has __float128 gone?"
^
make[3]: *** [fmain.lo] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-target-libgfortran] Error 2
make: *** [all] Error 2
So far I have been unable to track down a successful fix.
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.