Errors while compiling XNU-2782.1.97 - macos

I tried to compile XNU-2782.1.97 for my Mac that's on OSX Yosemite 10.10.3, but I got the following errors at the end of the compilation.
I think that normally I have everything that's needing for doing it.
...
clang: error: optimization flag '-freorder-blocks' is not supported
make[7]: *** [device_tree.o] Error 1
make[6]: *** [build_all] Error 2
make[5]: *** [do_all] Error 2
clang: error: optimization flag '-freorder-blocks' is not supported
make[4]: *** [build_all] Error 2
clang: error: optimization flag '-freorder-blocks' is not supported
make[3]: *** [build_all_recurse_into_conf] Error 2
make[7]: *** [IOLib.cpo] Error 1
make[2]: *** [build_all_recurse_into_pexpert] Error 2
make[2]: *** Waiting for unfinished jobs....
make[6]: *** [build_all] Error 2
make[5]: *** [do_all] Error 2
make[4]: *** [build_all] Error 2
make[3]: *** [build_all_recurse_into_conf] Error 2
make[2]: *** [build_all_recurse_into_iokit] Error 2
make[7]: *** [OSRuntimeSupport.o] Error 1
make[7]: *** Waiting for unfinished jobs....
C++ OSSerialize.cpo
clang: error: optimization flag '-freorder-blocks' is not supported
make[7]: *** [OSSerialize.cpo] Error 1
make[6]: *** [build_all] Error 2
make[5]: *** [do_all] Error 2
make[4]: *** [build_all] Error 2
make[3]: *** [build_all_recurse_into_conf] Error 2
make[2]: *** [build_all_recurse_into_libkern] Error 2
MIG atm_notification_user.c
MIG device_server.h
MIG default_pager_alerts_user.c
Generating audit_kevents.c from /Users/Martin/xnu-2782.1.97/bsd/kern/syscalls.master
MIG audit_triggers_user.c
MIG device_server.c
CC audit_mac.o
clang: error: optimization flag '-freorder-blocks' is not supported
make[7]: *** [audit_mac.o] Error 1
make[6]: *** [build_all] Error 2
make[5]: *** [do_all] Error 2
make[4]: *** [build_all] Error 2
make[3]: *** [build_all_recurse_into_conf] Error 2
make[2]: *** [build_all_recurse_into_bsd] Error 2
MIG default_pager_object_server.c
MIG UNDRequest.c
MIG clock_reply_user.c
MIG gssd_mach.c
MIG UNDReplyServer.c
MIG coalition_notification_user.c
MIG kextd_mach.c
MIG gssd_mach.h
MIG lockd_mach.c
MIG exc_user.c
MIG kextd_mach.h
MIG lockd_mach.h
MIG host_notify_reply_user.c
MIG mach_exc_user.c
MIG mach_notify_user.c
MIG memory_object_user.c
MIG memory_object_control_user.c
MIG memory_object_default_user.c
MIG task_access_user.c
MIG telemetry_notification_user.c
MIG upl_user.c
MIG vm_map_user.c
MIG clock_server.c
MIG clock_priv_server.c
MIG exc_server.c
MIG host_priv_server.c
MIG host_security_server.c
MIG lock_set_server.c
MIG mach_exc_server.c
MIG mach_host_server.c
MIG mach_notify_server.c
MIG mach_port_server.c
MIG mach_vm_server.c
MIG mach_voucher_server.c
MIG mach_voucher_attr_control_server.c
MIG memory_object_server.c
MIG memory_object_control_server.c
MIG memory_object_default_server.c
MIG processor_server.c
MIG processor_set_server.c
MIG task_server.c
MIG thread_act_server.c
MIG upl_server.c
MIG vm_map_server.c
MIG vm32_map_server.c
CC vm_compressor_backing_store.o
CC default_pager.o
CC dp_backing_store.o
CC dp_memory_object.o
clang: error: optimization flag '-freorder-blocks' is not supportedclang
: error: optimization flag '-freorder-blocks' is not supported
clang: error: optimization flag '-freorder-blocks' is not supported
clang: error: optimization flag '-freorder-blocks' is not supported
make[7]: *** [dp_memory_object.o] Error 1
make[7]: *** Waiting for unfinished jobs....
make[7]: *** [dp_backing_store.o] Error 1
make[7]: *** [default_pager.o] Error 1
make[7]: *** [vm_compressor_backing_store.o] Error 1
CC default_pager_alerts_user.o
clang: error: optimization flag '-freorder-blocks' is not supported
make[7]: *** [default_pager_alerts_user.o] Error 1
make[6]: *** [build_all] Error 2
make[5]: *** [do_all] Error 2
make[4]: *** [build_all] Error 2
make[3]: *** [build_all_recurse_into_conf] Error 2
make[2]: *** [build_all_recurse_into_osfmk] Error 2
make[1]: *** [build_all_bootstrap_RELEASE^X86_64^NONE] Error 2
make: *** [all] Error 2

You're most likely using the wrong Xcode version. An Apple kernel engineer, Shantonu Sen, maintains a blog about compiling xnu from source, and he tells you the the exact toolchain versions to use for each version of xnu. I suggest checking that you're doing it exactly as he says. You may need to use xcode-select to set the Xcode version that xcodebuild will use.

Here are the steps that I have done for compiling it.
Last login: Sat May 16 20:39:26 on ttys006
iMac-de-Martin:~ Martin$ curl -O http://opensource.apple.com/tarballs/xnu/xnu-2782.1.97.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9655k 100 9655k 0 0 48145 0 0:03:25 0:03:25 --:--:-- 64335
iMac-de-Martin:~ Martin$ tar zxf xnu-2782.1.97.tar.gz
iMac-de-Martin:~ Martin$ cd xnu-2782.1.97
iMac-de-Martin:xnu-2782.1.97 Martin$ make SDKROOT=macosx ARCH_CONFIGS=X86_64 KERNEL_CONFIGS=RELEASE

Related

Errors in building inet-3.6.0 in omnet 5.7

make: *** [Makefile:127: out/clang-debug//openflow_dbg.exe] Error 1
make: *** [Makefile:6: all] Error 2
make[1]: *** [Makefile:1190: ../out/clang-debug/src/inet/applications/packetdrill/PacketDrillApp.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Well, this is clearly to be expected as OMNET 5.7 requires at least INET 3.7.1 according to the INET download page.

trying to build rpm, receive ld error

I'm trying to install squid from source.
I issue the command make but it gets this error at the end:
/usr/bin/ld: cannot find -lssl
collect2: ld returned 1 exit status
make[3]: *** [basic_ncsa_auth] Error 1
make[3]: Leaving directory `/root/squid-3.4.6/helpers/basic_auth/NCSA'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/squid-3.4.6/helpers/basic_auth'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/squid-3.4.6/helpers'
make: *** [all-recursive] Error 1
Any ideas how to solve this?
You do not have the OpenSSL development toolkit installed.
yum install openssl

error during gcc 4.7.3 compilation

I am trying to compile local version of gcc 4.7.3 on the cluster.
For configuration:
./configure --prefix=$HOME/opt/gcc-4.7.3 --with-gmp=$HOME/opt/gmp --with-mpfr=$HOME/opt/mpfr --with-mpc=$HOME/opt/mpc --with-libelf=$HOME/opt/libelf
while compiling I got:
/home/users/didymos/opt/gmp/lib/libgmp.a(pprime_p.o):(.text+0x448):
undefined reference to `__multi3'
/home/users/didymos/opt/gmp/lib/libgmp.a(mod_1.o):(.text+0x158):
undefined reference to `__multi3'
/home/users/didymos/opt/gmp/lib/libgmp.a(mod_1.o):(.text+0x1b8):
undefined reference to `__multi3'
/home/users/didymos/opt/gmp/lib/libgmp.a(mod_1.o):(.text+0x358):
undefined reference to `__multi3'
/home/users/didymos/opt/gmp/lib/libgmp.a(pre_mod_1.o):(.text+0x74):
undefined reference to `__multi3'
/home/users/didymos/opt/gmp/lib/libgmp.a(mod_1_1.o):(.text+0x60): more
undefined references to `__multi3' follow
collect2: error: ld returned 1 exit status
make[8]: * [libjavamath.la] Error 1
make[8]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/32/libjava/classpath/native/jni/java-math'
make[7]: * [all-recursive] Error 1
make[7]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/32/libjava/classpath/native/jni'
make[6]: * [all-recursive] Error 1
make[6]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/32/libjava/classpath/native'
make[5]: * [all-recursive] Error 1
make[5]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/32/libjava/classpath'
make[4]: * [all-recursive] Error 1
make[4]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/32/libjava'
make[3]: * [multi-do] Error 1
make[3]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/libjava'
make[2]: * [all-multi] Error 2
make[2]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/libjava'
make[1]: * [all-target-libjava] Error 2
make[1]: * Waiting for unfinished jobs....
libtool: link: ranlib .libs/libgfortran.a
libtool: link: ( cd ".libs" && rm -f "libgfortran.la" && ln -s
"../libgfortran.la" "libgfortran.la" )
make[6]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/32/nof/libgfortran'
make[5]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/32/nof/libgfortran'
make[4]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/libgfortran'
make[3]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/libgfortran'
make[2]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/libgfortran'
make[1]: Leaving directory `/home/users/didymos/opt/gcc-4.3.7-scratch'
make: * [all] Error 2
Any ideas?
Thanks
Can you check that libgmp depends on? If libgmp depends on a library A, then most likely the undefined symbols would be in A.
If you have manually compiled libgmp from source, Can you add the configure command in the question?

gcc-4.8 failed with error "where has __float128 gone?"

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.

Error building pkg-config-0.28 on OS X 10.8

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.

Resources