i am trying to compile prex using this guide : Prex build guide
I want to make a bootable USB out of it and run it pretty much in any computer.
Now, i am using a x86_64 linux system
uname -a
Linux xbaremenos 3.19.0-32-generic #37~14.04.1-Ubuntu SMP Thu Oct 22 09:41:40 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
i run
./configure --target=x86-pc --cross-prefix=x86_64-linux-gnu-
which specifies i want it to build for a x86 platform but when i try to run make i get this message
~/Downloads/prex-0.9.0 $ make
x86_64-linux-gnu-cpp -D__ASSEMBLY__ -D__x86__ -D__pc__ -DKERNEL -I. -I/home/xbaremenos/Downloads/prex-0.9.0 -I/home/xbaremenos/Downloads/prex-0.9.0/include -I/home/xbaremenos/Downloads/prex-0.9.0/bsp/boot/include -I/home/xbaremenos/Downloads/prex-0.9.0/bsp/boot/x86 x86/pc/head.S x86/pc/head.tmp
x86_64-linux-gnu-as -o x86/pc/head.o x86/pc/head.tmp
rm -f x86/pc/head.tmp
x86_64-linux-gnu-gcc -c -Os -ansi -pedantic -Wall -Wundef -Wstrict-prototypes -Wpointer-arith -nostdinc -fno-strict-aliasing -fno-stack-protector -march=i386 -mpreferred-stack-boundary=2 -fomit-frame-pointer -fno-builtin -D__x86__ -D__pc__ -DKERNEL -I. -I/home/xbaremenos/Downloads/prex-0.9.0 -I/home/xbaremenos/Downloads/prex-0.9.0/include -I/home/xbaremenos/Downloads/prex-0.9.0/bsp/boot/include -I/home/xbaremenos/Downloads/prex-0.9.0/bsp/boot/x86 -o x86/pc/startup.o x86/pc/startup.c
x86/pc/startup.c:1:0: error: CPU you selected does not support x86-64 instruction set
/*-
^
x86/pc/startup.c:1:0: error: CPU you selected does not support x86-64 instruction set
x86/pc/startup.c:1:0: error: -mpreferred-stack-boundary=2 is not between 3 and 12
make[2]: *** [x86/pc/startup.o] Error 1
make[1]: *** [boot] Error 2
make: *** [bsp] Error 2
What am i doing wrong here ?
Related
When I compile the simulator using 'make', it appears an error.
(cd misc; make all)
make[1]: Entering directory '/root/archlab-handout/sim/misc'
gcc -Wall -O1 -g -fcommon -c yis.c
gcc -Wall -O1 -g -fcommon -c isa.c
gcc -Wall -O1 -g -fcommon yis.o isa.o -o yis
gcc -Wall -O1 -g -fcommon -c yas.c
flex yas-grammar.lex
mv lex.yy.c yas-grammar.c
gcc -O1 -fcommon -c yas-grammar.c
gcc -Wall -O1 -g -fcommon yas-grammar.o yas.o isa.o -lfl -o yas
/usr/bin/ld: cannot find -lfl
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:32: yas] Error 1
make[1]: Leaving directory '/root/archlab-handout/sim/misc'
make: *** [Makefile:26: all] Error 2
It seems like 'ld' returned 1 exit status. Can anyone help me how to solve this problem?
I have just learning computer science systematically for a while, and I do lack the experience with solving these problems.
Currently, we are working on QT for application development for our hardware that runs on the AM1808 processor.
At present, we developed our app using QT creator with compiler version Qt 4.8.7.
We are planning to upgrade it with Qt 5.7 and for that, we download the corresponding package from
http://download.qt.io/official_releases/qt/5.7/5.7.1/single/qt-everywhere-opensource-src-5.7.1.tar.gz
We successfully download this and now need to configure according to our current arm toolchain.
we have modified the qmake.conf as per below,
#
# qmake configuration for building with arm-linux-gnueabi-g++
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
// modifications to g++.conf
//QMAKE_CC = arm-linux-gnueabi-gcc
//QMAKE_CXX = arm-linux-gnueabi-g++
//QMAKE_LINK = arm-linux-gnueabi-g++
//QMAKE_LINK_SHLIB = arm-linux-gnueabi-g++
// modifications to linux.conf
//QMAKE_AR = arm-linux-gnueabi-ar cqs
//QMAKE_OBJCOPY = arm-linux-gnueabi-objcopy
//QMAKE_NM = arm-linux-gnueabi-nm -P
//QMAKE_STRIP = arm-linux-gnueabi-strip
QMAKE_CC = arm-none-linux-gnueabi-gcc
QMAKE_CXX = arm-none-linux-gnueabi-g++
QMAKE_LINK = arm-none-linux-gnueabi-g++
QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++
QMAKE_AR = arm-none-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy
QMAKE_STRIP = arm-none-linux-gnueabi-strip
load(qt_config)
after that, we run config command
./configure -opensource -confirm-license -prefix /usr/local/Qt5 -no-pch -xplatform linux-arm-gnueabi-g++
but we found the following error,
System architecture: 'arm'
Host architecture: 'i386'
arm-none-linux-gnueabi-g++ -c -fvisibility=hidden fvisibility.c
Symbol visibility control enabled.
cc1plus: error: unrecognized command line option '-fuse-ld=gold'
arm-none-linux-gnueabi-g++ -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
bsymbolic_functions.c:2:2: error: #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
Symbolic function binding disabled.
checking for C++14...
arm-none-linux-gnueabi-g++ -c -pipe -O2 -std=gnu++1y -Wall -W -fPIC -I. -I../../../mkspecs/linux-arm-gnueabi-g++ -o c++14.o c++14.cpp
cc1plus: error: unrecognized command line option '-std=gnu++1y'
make: *** [c++14.o] Error 1
C++14 disabled.
checking for default C++ standard edition...
arm-none-linux-gnueabi-g++ -pipe -O2 -Wall -W -fPIC -I. -I../../../mkspecs/linux-arm-gnueabi-g++ -o c++default.ii -E c++default.cpp
default C++ standard edition enabled.
checking for 64-bit std::atomic...
arm-none-linux-gnueabi-g++ -c -pipe -O2 -std=gnu++11 -Wall -W -fPIC -I. -I../../../mkspecs/linux-arm-gnueabi-g++ -o atomic64.o atomic64.cpp
cc1plus: error: unrecognized command line option '-std=gnu++11'
make: *** [atomic64.o] Error 1
64-bit std::atomic disabled.
checking for 64-bit std::atomic in -latomic...
arm-none-linux-gnueabi-g++ -c -pipe -O2 -std=gnu++11 -Wall -W -fPIC -I. -I../../../mkspecs/linux-arm-gnueabi-g++ -o atomic64.o atomic64.cpp
cc1plus: error: unrecognized command line option '-std=gnu++11'
make: *** [atomic64.o] Error 1
64-bit std::atomic in -latomic disabled.
checking for std::atomic for function pointers...
arm-none-linux-gnueabi-g++ -c -pipe -O2 -std=gnu++11 -Wall -W -fPIC -I. -I../../../mkspecs/linux-arm-gnueabi-g++ -o atomicfptr.o atomicfptr.cpp
cc1plus: error: unrecognized command line option '-std=gnu++11'
make: *** [atomicfptr.o] Error 1
std::atomic for function pointers disabled.
ERROR: detected a std::atomic implementation that fails for function pointers.
Please apply the patch corresponding to your Standard Library vendor, found in
/opt/qt-everywhere-opensource-src-5.7.1/qtbase/config.tests/common/atomicfptr
so, please suggest us correct method to compile this qt5 version.
Your toolchain is too old. Qt 5.6 was the last release which doesn't require a more or less fully C++ 11 compliant compiler. This changed with Qt 5.7.
Either upgrade your toolchain to 4.8 (at least) or try Qt 5.6.
I have been trying to compile xalan-c specifically 1.11 with xerces 3.1.1. with an arm cross-compile toolchain 4.3.3 from CodeSourcery on a ubuntu 14.x 64.
xalan-c has two configure scripts. First the usual ./configure and second ./runConfigure.
Up until now I have been cross-compiling other libs (e.g. libusb-1.0/libusb-0.1/openssl) with
--host../configure --host=arm-none-linux-gnueabi --prefix="/home/user/sysroot-arm-sf/usr/local/"
This time however I believe I need to use ./runConfigure otherwise some environment variables are not set (e.g. how it deals with messages)
I use:
./runConfigure -p linux -x arm-none-linux-gnueabi-g++ -c arm-none-linux-gnueabi-gcc -P "/home/user/sysroot-arm-sf/usr/local/" -C--host=arm-none-linux-gnueabi
instead which I believe to be the equivalent to ./configure . the ./runConfigure is using all default values (except for the c and c++ compiler which it does not recognize, unfortunately)
Generating makefiles with the following options ...
Platform: linux
C Compiler: arm-none-linux-gnueabi-gcc
C++ Compiler: arm-none-linux-gnueabi-g++
Extra compile options:
Extra link options:
Transcoder: default
Localization system: inmem
Locale: en_US
Thread option: pthread
bitsToBuild option: 32
Extra configure options: --prefix=/home/user/sysroot-arm-sf/usr/local/ --host=arm-none-linux-gnueabi
Debug is OFF
I do not recognize the C compiler 'arm-none-linux-gnueabi-gcc'. Continuing anyway ...
I do not recognize the C++ compiler 'arm-none-linux-gnueabi-g++'. Continuing anyway ...
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
checking for arm-none-linux-gnueabi-gcc... arm-none-linux-gnueabi-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-none-linux-gnueabi-gcc accepts -g... yes
checking for arm-none-linux-gnueabi-gcc option to accept ANSI C... none needed
checking for arm-none-linux-gnueabi-g++... arm-none-linux-gnueabi-g++
checking whether we are using the GNU C++ compiler... yes
checking whether arm-none-linux-gnueabi-g++ accepts -g... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for autoconf... autoconf
checking build system type... x86_64-unknown-linux-gnu
checking host system type... arm-none-linux-gnueabi
checking for floor in -lm... yes
checking how to run the C++ preprocessor... arm-none-linux-gnueabi-g++ -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for mbstowcs... yes
checking if mbstowcs can count only... cross-compiling default
configure: creating ./config.status
config.status: creating Makefile.incl
config.status: creating Makefile
config.status: creating src/xalanc/Makefile
config.status: creating src/xalanc/Utils/Makefile
config.status: creating src/xalanc/Utils/MsgCreator/Makefile
config.status: creating src/xalanc/Utils/XalanMsgLib/Makefile
config.status: creating samples/Makefile
config.status: creating Tests/Makefile
If the result of the above commands look OK to you, go to the directory
/home/user/xalan-c-1.11/c/ and type "gmake" or "make" to make the XALAN-C system.
Note: You must use GNU make to use the Xalan Makefile.
Then I'll try
make
make -C src/xalanc all
make[1]: Entering directory `/home/user/xalan-c-1.11/c/src/xalanc'
Preparing the directory structure for a build ...
mkdir -p ../../obj
mkdir -p ../../lib
mkdir -p ../../bin
make -C Utils prepare
make[2]: Entering directory `/home/user/xalan-c-1.11/c/src/xalanc/Utils'
mkdir -p ../../../nls
mkdir -p ../../../nls/include
make[2]: Leaving directory `/home/user/xalan-c-1.11/c/src/xalanc/Utils'
make -C Utils locale
make[2]: Entering directory `/home/user/xalan-c-1.11/c/src/xalanc/Utils'
make -C MsgCreator
make[3]: Entering directory `/home/user/xalan-c-1.11/c/src/xalanc/Utils/MsgCreator'
arm-none-linux-gnueabi-g++ -O3 -DNDEBUG -pthread -D_REENTRANT -Wall -fPIC -DLINUX -D_REENTRANT -DXALAN_INMEM_MSG_LOADER -c -I/home/user/xalan-c-1.11/c//src -I/home/user/xalan-c-1.11/c//include -I../../../../nls/include -I/home/user/xerces-c-3.1.1//src/ -I/home/user/xerces-c-3.1.1//include/xercesc -I/home/user/xerces-c-3.1.1//include/ -o ../../../../obj/MsgFileOutputStream.o /home/user/xalan-c-1.11/c//src/xalanc/Utils/MsgCreator/MsgFileOutputStream.cpp
arm-none-linux-gnueabi-g++ -O3 -DNDEBUG -pthread -D_REENTRANT -Wall -fPIC -DLINUX -D_REENTRANT -DXALAN_INMEM_MSG_LOADER -c -I/home/user/xalan-c-1.11/c//src -I/home/user/xalan-c-1.11/c//include -I../../../../nls/include -I/home/user/xerces-c-3.1.1//src/ -I/home/user/xerces-c-3.1.1//include/xercesc -I/home/user/xerces-c-3.1.1//include/ -o ../../../../obj/ICUResHandler.o /home/user/xalan-c-1.11/c//src/xalanc/Utils/MsgCreator/ICUResHandler.cpp
arm-none-linux-gnueabi-g++ -O3 -DNDEBUG -pthread -D_REENTRANT -Wall -fPIC -DLINUX -D_REENTRANT -DXALAN_INMEM_MSG_LOADER -c -I/home/user/xalan-c-1.11/c//src -I/home/user/xalan-c-1.11/c//include -I../../../../nls/include -I/home/user/xerces-c-3.1.1//src/ -I/home/user/xerces-c-3.1.1//include/xercesc -I/home/user/xerces-c-3.1.1//include/ -o ../../../../obj/InMemHandler.o /home/user/xalan-c-1.11/c//src/xalanc/Utils/MsgCreator/InMemHandler.cpp
arm-none-linux-gnueabi-g++ -O3 -DNDEBUG -pthread -D_REENTRANT -Wall -fPIC -DLINUX -D_REENTRANT -DXALAN_INMEM_MSG_LOADER -c -I/home/user/xalan-c-1.11/c//src -I/home/user/xalan-c-1.11/c//include -I../../../../nls/include -I/home/user/xerces-c-3.1.1//src/ -I/home/user/xerces-c-3.1.1//include/xercesc -I/home/user/xerces-c-3.1.1//include/ -o ../../../../obj/MsgCreator.o /home/user/xalan-c-1.11/c//src/xalanc/Utils/MsgCreator/MsgCreator.cpp
arm-none-linux-gnueabi-g++ -O3 -DNDEBUG -pthread -D_REENTRANT -Wall -fPIC -DLINUX -D_REENTRANT -DXALAN_INMEM_MSG_LOADER -c -I/home/user/xalan-c-1.11/c//src -I/home/user/xalan-c-1.11/c//include -I../../../../nls/include -I/home/user/xerces-c-3.1.1//src/ -I/home/user/xerces-c-3.1.1//include/xercesc -I/home/user/xerces-c-3.1.1//include/ -o ../../../../obj/NLSHandler.o /home/user/xalan-c-1.11/c//src/xalanc/Utils/MsgCreator/NLSHandler.cpp
arm-none-linux-gnueabi-g++ -O3 -DNDEBUG -pthread -D_REENTRANT -Wall -fPIC -DLINUX -D_REENTRANT -DXALAN_INMEM_MSG_LOADER -c -I/home/user/xalan-c-1.11/c//src -I/home/user/xalan-c-1.11/c//include -I../../../../nls/include -I/home/user/xerces-c-3.1.1//src/ -I/home/user/xerces-c-3.1.1//include/xercesc -I/home/user/xerces-c-3.1.1//include/ -o ../../../../obj/SAX2Handler.o /home/user/xalan-c-1.11/c//src/xalanc/Utils/MsgCreator/SAX2Handler.cpp
arm-none-linux-gnueabi-g++ -DLINUX -fPIC -pthread -D_REENTRANT -DXALAN_INMEM_MSG_LOADER \
-lm -lpthread ../../../../obj/MsgFileOutputStream.o ../../../../obj/ICUResHandler.o ../../../../obj/InMemHandler.o ../../../../obj/MsgCreator.o ../../../../obj/NLSHandler.o ../../../../obj/SAX2Handler.o -o ../../../../bin/MsgCreator -L/home/user/xerces-c-3.1.1//lib -lxerces-c
make[3]: Leaving directory `/home/user/xalan-c-1.11/c/src/xalanc/Utils/MsgCreator'
../../../bin/MsgCreator /home/user/xalan-c-1.11/c//src/xalanc/NLS/en_US/XalanMsg_en_US.xlf -TYPE inmem -LOCALE en_US
../../../bin/MsgCreator: ../../../bin/MsgCreator: cannot execute binary file
make[2]: *** [../../../nls/include/LocalMsgData.hpp] Error 126
make[2]: Leaving directory `/home/user/xalan-c-1.11/c/src/xalanc/Utils'
make[1]: *** [locale] Error 2
make[1]: Leaving directory `/home/user/xalan-c-1.11/c/src/xalanc'
make: *** [all] Error 2
and it will fail executing
../../../bin/MsgCreator /home/user/xalan-c-1.11/c//src/xalanc/NLS/en_US/XalanMsg_en_US.xlf -TYPE inmem -LOCALE en_US
which is
bin/MsgCreator: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.14, not stripped
a binary for an Arm arch. I though ./runConfigure had used the --host option and was aware this was a cross build. Or maybe this is something xalan-c specific?
It does say
checking whether we are cross compiling... yes
So this looks like a poorly tested makefile, to me.
You could try to debug it, or you could just install qemu so that ARM binaries magically Just Work (assuming they can find their libraries).
I tried the following workaround which apparently worked.
The files in the xalanc bin/ Folder seem to be only used at compile time (at least I guessed so). Xalan generates headerfiles etc. in order to compile the libxalanMsg.so .
It was a long shot but I simply precompile those bin/ files for Ubuntu x86 and copied those files into my cross compile bin folder.
done. (at least for now)
This problem is really tough and weird. Fortunately, I find a way to resolve this problem.
From the error, we can conclude that the build process uses an executable tool named 'MsgCreator'.
Where is it from?
Actually, this tool is an intermediate product of the build process. Xalan generate it and use this tool to do something he wants.
What happens?
You may remember that you are now cross-compiling Xalan, so the target executable platform of MsgCreator may not support your build platform. This case will cause the error you see.
How to solve this problem
Use the local compiler to build a local MsgCreator which means this tool can run on your build platform.
Update the code in …./xalan-c-1.11/c/src/xalanc/Utils/MsgCreator/Malefile.in.
$(XSL_BIN_DIR)/MsgCreator -> $(XSL_BIN_TMP_DIR)/MsgCreator
Export XSL_BIN_TMP_DIR to your local MsgCreator tool path.
export LD_LIBRARY_PATH to add MsgCreator dependency libraries. These libraries can be generated by compiling Xerces-C (the version must greater than 3.0) with your local compiler.
Cross compile Xalan, everything will go well.
this morning I downloaded the lastest mDNSResponder from the Apple opensource repository. I opened the xCode project (mDNSResponder-544/mDNSMacOSX) and tried to compile, but few files are missing:
#include <CoreFoundation/CFXPCBridge.h> in BonjourEvents.c is not found.
#include <dispatch/private.h> in dns-sd.c is not found (but compiles with GCC, so I'm ok with that)
other errors...
I am running Xcode 5.1 on OSx 10.9.2, with command line tool installed.
I am attaching the output of xcodebuild:
$ xcodebuild
--- xcodebuild: WARNING: The directory /Users/kas/Downloads/mDNSResponder-544/mDNSMacOSX also contains the legacy project 'mDNSResponder.pbproj' - ignoring it and using 'mDNSResponder.xcodeproj'.
=== BUILD TARGET BonjourEvents OF PROJECT mDNSResponder WITH THE DEFAULT CONFIGURATION (Development) ===
Check dependencies
CompileC build/mDNSResponder.build/Development/BonjourEvents.build/Objects-normal/x86_64/BonjourEvents.o BonjourEvents.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/adsada/Downloads/mDNSResponder-544/mDNSMacOSX
export LANG=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -arch x86_64 -fmessage-length=129 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -Wno-trigraphs -fpascal-strings -Os -Werror -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -D__APPLE_USE_RFC_3542=1 -D_DNS_SD_LIBDISPATCH=1 -DAPPLE_OSX_mDNSResponder=1 -D__MigTypeCheck=1 -DmDNSResponderVersion=(Engineering\ Build) -D_LEGACY_NAT_TRAVERSAL_ -D_BUILDING_XCODE_PROJECT_=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -mmacosx-version-min=10.9 -g -Wno-sign-conversion -iquote /Users/askdjkadj/Downloads/mDNSResponder-544/mDNSMacOSX/build/mDNSResponder.build/Development/BonjourEvents.build/BonjourEvents-generated-files.hmap -I/Users/sdaad/Downloads/mDNSResponder-544/mDNSMacOSX/build/mDNSResponder.build/Development/BonjourEvents.build/BonjourEvents-own-target-headers.hmap -I/Users/sadad/Downloads/mDNSResponder-544/mDNSMacOSX/build/mDNSResponder.build/Development/BonjourEvents.build/BonjourEvents-all-target-headers.hmap -iquote /Users/asdsad/Downloads/mDNSResponder-544/mDNSMacOSX/build/mDNSResponder.build/Development/BonjourEvents.build/BonjourEvents-project-headers.hmap -I/Users/asdd/Downloads/mDNSResponder-544/mDNSMacOSX/build/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/asad/Downloads/mDNSResponder-544/mDNSMacOSX/build/mDNSResponder.build/Development/BonjourEvents.build/DerivedSources/x86_64 -I/Users/adssad/Downloads/mDNSResponder-544/mDNSMacOSX/build/mDNSResponder.build/Development/BonjourEvents.build/DerivedSources -W -Wall -Wmissing-prototypes -Wno-four-char-constants -Wno-unknown-pragmas -Wshadow -F/Users/asdd/Downloads/mDNSResponder-544/mDNSMacOSX/build -DUSE_SYSTEMCONFIGURATION_PRIVATE_HEADERS -fwrapv -MMD -MT dependencies -MF /Users/asd/Downloads/mDNSResponder-544/mDNSMacOSX/build/mDNSResponder.build/Development/BonjourEvents.build/Objects-normal/x86_64/BonjourEvents.d --serialize-diagnostics /Users/sad/Downloads/mDNSResponder-544/mDNSMacOSX/build/mDNSResponder.build/Development/BonjourEvents.build/Objects-normal/x86_64/BonjourEvents.dia -c /Users/asd/Downloads/mDNSResponder-544/mDNSMacOSX/BonjourEvents.c -o /Users/ads/Downloads/mDNSResponder-544/mDNSMacOSX/build/mDNSResponder.build/Development/BonjourEvents.build/Objects-normal/x86_64/BonjourEvents.o
/Users/asd/Downloads/mDNSResponder-544/mDNSMacOSX/BonjourEvents.c:19:10: fatal error: 'CoreFoundation/CFXPCBridge.h' file not found
#include <CoreFoundation/CFXPCBridge.h>
^
1 error generated.
2014-04-06 13:10:32.208 xcodebuild[3417:30b] DVTAssertions: Warning in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-5067/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/SpecificationTypes/BuiltInSpecifications/Compilers/XCGccMakefileDependencies.m:76
Details: Failed to load dependencies output contents from ``/Users/asd/Downloads/mDNSResponder-544/mDNSMacOSX/build/mDNSResponder.build/Development/BonjourEvents.build/Objects-normal/x86_64/BonjourEvents.d''. Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “BonjourEvents.d” couldn’t be opened because there is no such file." UserInfo=0x7fbacb566c60 {NSFilePath=/Users/asd/Downloads/mDNSResponder-544/mDNSMacOSX/build/mDNSResponder.build/Development/BonjourEvents.build/Objects-normal/x86_64/BonjourEvents.d, NSUnderlyingError=0x7fbacb5364c0 "The operation couldn’t be completed. No such file or directory"}. User info: {
NSFilePath = "/Users/ada/Downloads/mDNSResponder-544/mDNSMacOSX/build/mDNSResponder.build/Development/BonjourEvents.build/Objects-normal/x86_64/BonjourEvents.d";
NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 \"The operation couldn\U2019t be completed. No such file or directory\"";
}.
Function: void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString *__strong, void (^__strong)(NSString *__strong))
Thread: <NSThread: 0x7fbacb561070>{name = (null), num = 7}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
** BUILD FAILED **
The following build commands failed:
CompileC build/mDNSResponder.build/Development/BonjourEvents.build/Objects-normal/x86_64/BonjourEvents.o BonjourEvents.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
and indeed locate CFXPCBridge.h returns nothing.
Thanks for your help.
I want to install the R-Perl module to use R from within Perl, but am not having success with the command sudo R CMD INSTALL --configure-args='--with-in-perl' RSPerl/ as documented here: http://www.omegahat.org/RSPerl/RFromPerl.html. I posted earlier regarding this issue, and determined that I was having problems with the new GCC 4.2. However, I'm now using GCC 4.0.1 and am having different issues. Here is the output of the command above:
* installing to library ‘/Library/Frameworks/R.framework/Versions/2.13/Resources/library’
* installing *source* package ‘RSPerl’ ...
checking for perl... /usr/bin/perl
No support for any of the Perl modules from calling Perl from R.
*****************************************************
Set PERL5LIB to /Library/Frameworks/R.framework/Versions/2.13/Resources/library/RSPerl/perl
*****************************************************
Testing: -F/Library/Frameworks/R.framework/.. -framework R
Using '/usr/bin/perl' as the perl executable
Perl modules (no):
Adding R package to list of Perl modules to enable callbacks to R from Perl
Creating the C code for dynamically loading modules with native code for Perl: R
modules: R; linking:
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
Support R in Perl: yes
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating inst/scripts/RSPerl.csh
config.status: creating inst/scripts/RSPerl.bsh
config.status: creating src/RinPerlMakefile
config.status: creating src/Makefile.PL
config.status: creating cleanup
config.status: creating src/R.pm
config.status: creating R/perl5lib.R
making target all in RinPerlMakefile
RinPerlMakefile:5: /Library/Frameworks/R.framework/Resources/etc/Makeconf: No such file or directory
make: *** No rule to make target `/Library/Frameworks/R.framework/Resources/etc/Makeconf'. Stop.
calling make -f Makefile.perl install
make: Makefile.perl: No such file or directory
make: *** No rule to make target `Makefile.perl'. Stop.
chmod: blib/lib/R.pm: No such file or directory
Finished configuration
** libs
*** arch - x86_64
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I. -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include -I/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -I/usr/local/include -fPIC -g -O2 -c Converters.c -o Converters.o
In file included from /Library/Frameworks/R.framework/Resources/include/R_ext/RS.h:27,
from /Library/Frameworks/R.framework/Resources/include/Rdefines.h:26,
from RSCommon.h:55,
from RSPerl.h:8,
from Converters.h:4,
from Converters.c:1:
/Library/Frameworks/R.framework/Resources/include/Rconfig.h:5:25: error: ppc/Rconfig.h: No such file or directory
In file included from RSCommon.h:72,
from RSPerl.h:8,
from Converters.h:4,
from Converters.c:1:
/Library/Frameworks/R.framework/Resources/include/Rversion.h:5:26: error: ppc/Rversion.h: No such file or directory
In file included from RSPerl.h:8,
from Converters.h:4,
from Converters.c:1:
RSCommon.h:73:28: error: missing binary operator before token "("
lipo: can't open input file: /var/tmp//ccd76npm.out (No such file or directory)
make: *** [Converters.o] Error 1
ERROR: compilation failed for package ‘RSPerl’
* removing ‘/Library/Frameworks/R.framework/Versions/2.13/Resources/library/RSPerl’
And here is the config.log contents:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ ./configure --with-in-perl
## --------- ##
## Platform. ##
## --------- ##
hostname = N01-0006-_MBP.local
uname -m = x86_64
uname -r = 10.8.0
uname -s = Darwin
uname -v = Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64
/usr/bin/uname -p = i386
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = Mach kernel version:
Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64
Kernel configured for up to 4 processors.
2 processors are physically available.
4 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1 2 3
Primary memory available: 4.00 gigabytes
Default processor set: 79 tasks, 365 threads, 4 processors
Load average: 0.52, Mach factor: 3.46
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/local/bin
PATH: /usr/local/sbin
PATH: /usr/local/mysql/bin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/local/bin
PATH: /usr/X11/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1645: checking for perl
configure:1663: found /usr/bin/perl
configure:1675: result: /usr/bin/perl
configure:2013: checking for gcc
configure:2029: found /usr/bin/gcc
configure:2040: result: gcc
configure:2278: checking for C compiler version
configure:2285: gcc --version >&5
i686-apple-darwin10-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5494)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2288: $? = 0
configure:2295: gcc -v >&5
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc_40/gcc_40-5494~315/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin10 --with-arch=apple --with-tune=generic --host=i686-apple-darwin10 --target=i686-apple-darwin10
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5494)
configure:2298: $? = 0
configure:2305: gcc -V >&5
gcc-4.0: argument to `-V' is missing
configure:2308: $? = 1
configure:2331: checking for C compiler default output file name
configure:2358: gcc -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include -I/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE -DPERL_POLLUTE conftest.c >&5
configure:2361: $? = 0
configure:2407: result: a.out
configure:2412: checking whether the C compiler works
configure:2422: ./a.out
configure:2425: $? = 0
configure:2442: result: yes
configure:2449: checking whether we are cross compiling
configure:2451: result: no
configure:2454: checking for suffix of executables
configure:2461: gcc -o conftest -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include -I/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE -DPERL_POLLUTE conftest.c >&5
configure:2464: $? = 0
configure:2488: result:
configure:2494: checking for suffix of object files
configure:2520: gcc -c -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include -I/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE -DPERL_POLLUTE conftest.c >&5
configure:2523: $? = 0
configure:2546: result: o
configure:2550: checking whether we are using the GNU C compiler
configure:2579: gcc -c -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include -I/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE -DPERL_POLLUTE conftest.c >&5
configure:2585: $? = 0
configure:2592: test -z "$ac_c_werror_flag" || test ! -s conftest.err
configure:2595: $? = 0
configure:2602: test -s conftest.o
configure:2605: $? = 0
configure:2619: result: yes
configure:2624: checking whether gcc accepts -g
configure:2654: gcc -c -g conftest.c >&5
configure:2660: $? = 0
configure:2667: test -z "$ac_c_werror_flag" || test ! -s conftest.err
configure:2670: $? = 0
configure:2677: test -s conftest.o
configure:2680: $? = 0
configure:2810: result: yes
configure:2827: checking for gcc option to accept ISO C89
configure:2901: gcc -c -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include -I/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE -DPERL_POLLUTE conftest.c >&5
configure:2907: $? = 0
configure:2914: test -z "$ac_c_werror_flag" || test ! -s conftest.err
configure:2917: $? = 0
configure:2924: test -s conftest.o
configure:2927: $? = 0
configure:2947: result: none needed
configure:2988: gcc -c -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include -I/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE -DPERL_POLLUTE conftest.c >&5
configure:2994: $? = 0
configure:3001: test -z "$ac_c_werror_flag" || test ! -s conftest.err
configure:3004: $? = 0
configure:3011: test -s conftest.o
configure:3014: $? = 0
configure:3211: creating ./config.status
## ---------------------- ##
## Running config.status. ##
## ---------------------- ##
This file was extended by config.status, which was
generated by GNU Autoconf 2.60. Invocation command line was
CONFIG_FILES =
CONFIG_HEADERS =
CONFIG_LINKS =
CONFIG_COMMANDS =
$ ./config.status
on N01-0006-_MBP.local
config.status:584: creating src/Makevars
config.status:584: creating inst/scripts/RSPerl.csh
config.status:584: creating inst/scripts/RSPerl.bsh
config.status:584: creating src/RinPerlMakefile
config.status:584: creating src/Makefile.PL
config.status:584: creating cleanup
config.status:584: creating src/R.pm
config.status:584: creating R/perl5lib.R
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_c_compiler_gnu=yes
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_objext=o
ac_cv_path_PERL=/usr/bin/perl
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_cc_c89=
ac_cv_prog_cc_g=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
CC='gcc'
CFLAGS=''
CPPFLAGS=''
DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\"'
ECHO_C='ECHO_N=''
ECHO_T=''
EXEEXT=''
LANGUAGE_DEFS=' -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1'
LDFLAGS=''
LD_PATH='/Library/Frameworks/R.framework/Versions/2.13/Resources/library/RSPerl/libs'
LD_PATH_VAR='DYLD_LIBRARY_PATH'
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
NO_SUPPORT_R_IN_PERL='0'
OBJEXT='o'
OTHERLDFLAGS='-F/Library/Frameworks/R.framework/.. -framework R'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PERL5_PATH='/Library/Frameworks/R.framework/Versions/2.13/Resources/library/RSPerl/perl'
PERL='/usr/bin/perl'
PERL_INSTALL_PREFIX='PREFIX=/Library/Frameworks/R.framework/Versions/2.13/Resources/library/RSPerl LIB=/Library/Frameworks/R.framework/Versions/2.13/Resources/library/RSPerl/perl'
PERL_LD_MAKE_ARG='LD=/usr/bin/gcc'
PERL_MODULE_SO_DIRS=''
R_HOME='/Library/Frameworks/R.framework/Resources'
R_IN_PERL_DEFINES='-DWITH_R_IN_PERL=1'
R_IN_PERL_LIBRARY='RinPerl'
R_LIBRARY_DIR='/Library/Frameworks/R.framework/Versions/2.13/Resources/library'
R_PACKAGE_DIR='/Library/Frameworks/R.framework/Versions/2.13/Resources/library/RSPerl'
R_PERL_MODULES='c("R")'
R_SHLIB_CPPFLAGS='-I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64'
R_SHLIB_LDFLAGS='-F/Library/Frameworks/R.framework/.. -framework R'
R_SO_DIR='-F/Library/Frameworks/R.framework/.. -framework R'
SHELL='/bin/sh'
ac_ct_CC='gcc'
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='${prefix}'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/local'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
configure: exit 0
Based off of some information I read on http://passingcuriosity.com/2009/installing-pil-on-mac-os-x-leopard/, I deleted the -arch ppc and -arch i386 flags from the gcc call, and it worked without error. However, I am not sure how to edit the source of R-Perl to make sure that when this GCC call runs, it runs without the unnecessary flags. I tried sudo R --arch=x86_64 CMD INSTALL ..., however this does not remove the other architectures from that GCC call still.
Any insight those with more experience than I can give would be greatly appreciated. Thank you!
With help from user flolo, I created the following shell script:
#!/bin/bash
COMMANDLINE=$#
COMMANDLINE=${COMMANDLINE/"-arch i386"}
COMMANDLINE=${COMMANDLINE/"-arch ppc"}
ECHO "--------------------------------------------"
ECHO "/usr/bin/gcc-4.0 $COMMANDLINE"
ECHO "--------------------------------------------"
/usr/bin/gcc-4.0 $COMMANDLINE
and then made a symbolic link to it called gcc-4.2. This did two things: it removed the unwanted flags, and it also made sure that GCC 4.0 was being used. (GCC 4.2 has been a pain in the neck.)
However, now I'm running into more problems, but I believe them to be unrelated to the architecture, certainly the arch flags. Therefore this solution does solve the question asked.