Error with arm-trusted-firmware compilation when built by cross toolchain - arm64

I am working on rcar gen 3 platform from Renesas and particularly on arm-trusted-firmware level.
1. bootparam_sa0.srec Loader(Boot parameter) <======= arm-trusted-firmware
2. bl2-m3ulcb.srec Loader <======= arm-trusted-firmware
3. cert_header_sa6.srec Loader(Certification) <======= arm-trusted-firmware
4. bl31-m3ulcb.srec ARM Trusted Firmware <======= arm-trusted-firmware
5. tee-m3ulcb.srec Open Portable Trusted OS <======= optee-os
6. u-boot-elf.srec U-Boot <======= u-boot
I built BL31 by command with Gcc v5.4
$ make ARCH=aarch64 CROSS_COMPILE=aarch64-linux-gnu- PLAT=rcar LSI=M3 RCAR_GEN3_ULCB=1 RCAR_LOSSY_ENABLE=1 RCAR_DRAM_SPLIT=2 PMIC_LEVEL_MODE=0 bl31
But I ran into the below err:
"
Including services/spd/opteed/opteed.mk
AS bl31/aarch64/runtime_exceptions.S
bl31/aarch64/runtime_exceptions.S: Assembler messages:
bl31/aarch64/runtime_exceptions.S:183: Error: non-constant expression in ".if" statement
bl31/aarch64/runtime_exceptions.S:191: Error: non-constant expression in ".if" statement
bl31/aarch64/runtime_exceptions.S:196: Error: non-constant expression in ".if" statement
bl31/aarch64/runtime_exceptions.S:201: Error: non-constant expression in ".if" statement
bl31/aarch64/runtime_exceptions.S:215: Error: non-constant expression in ".if" statement
bl31/aarch64/runtime_exceptions.S:219: Error: non-constant expression in ".if" statement
bl31/aarch64/runtime_exceptions.S:223: Error: non-constant expression in ".if" statement
bl31/aarch64/runtime_exceptions.S:227: Error: non-constant expression in ".if" statement
bl31/aarch64/runtime_exceptions.S:241: Error: non-constant expression in ".if" statement
bl31/aarch64/runtime_exceptions.S:245: Error: non-constant expression in ".if" statement
bl31/aarch64/runtime_exceptions.S:249: Error: non-constant expression in ".if" statement
bl31/aarch64/runtime_exceptions.S:257: Error: non-constant expression in ".if" statement
bl31/aarch64/runtime_exceptions.S:271: Error: non-constant expression in ".if" statement
bl31/aarch64/runtime_exceptions.S:275: Error: non-constant expression in ".if" statement
bl31/aarch64/runtime_exceptions.S:279: Error: non-constant expression in ".if" statement
bl31/aarch64/runtime_exceptions.S:287: Error: non-constant expression in ".if" statement
Makefile:556: recipe for target 'build/rcar/release/bl31/runtime_exceptions.o' failed
make: *** [build/rcar/release/bl31/runtime_exceptions.o] Error 1
"
Same error: https://github.com/ARM-software/tf-issues/issues/417
The assembly code is correct and is apparently not the problem.
It seemed that it depends on Compiler. I was trying to install gcc/g++ 7.4 cross:
http://ftp.br.debian.org/debian/pool/main/g/gcc-7-cross/gcc-7-aarch64-linux-gnu_7.4.0-1cross1_amd64.deb
http://ftp.br.debian.org/debian/pool/main/g/gcc-7-cross/g++-7-aarch64-linux-gnu_7.4.0-1cross1_amd64.deb
on Ubuntu 16.04, and modified the Makefile to used gcc-7 (cross), g++-7 (cross), but still had this error. How can I overcome this err ?

You could stop using the toolchains that are provided with your Linux distribution, and start using a Linaro toolchain instead:
wget https://releases.linaro.org/components/toolchain/binaries/latest-7/aarch64-elf/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-elf.tar.xz
tar Jxf gcc-linaro-7.4.1-2019.02-x86_64_aarch64-elf.tar.xz -C /opt
git clone https://github.com/renesas-rcar/arm-trusted-firmware arm-trusted-firmware-renesas
cd arm-trusted-firmware-renesas
make ARCH=aarch64 CROSS_COMPILE=/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-elf/bin/aarch64-elf- PLAT=rcar LSI=M3 RCAR_GEN3_ULCB=1 RCAR_LOSSY_ENABLE=1 RCAR_DRAM_SPLIT=2 PMIC_LEVEL_MODE=0 bl31
Including services/spd/opteed/opteed.mk
CC drivers/arm/gic/common/gic_common.c
CC drivers/arm/gic/v2/gicv2_main.c
CC drivers/arm/gic/v2/gicv2_helpers.c
CC plat/common/plat_gicv2.c
CC drivers/arm/cci/cci.c
CC plat/renesas/rcar/bl31_rcar_setup.c
CC plat/renesas/rcar/rcar_pm.c
CC plat/renesas/rcar/rcar_sip_svc.c
CC plat/renesas/rcar/drivers/board/board.c
CC plat/renesas/rcar/drivers/dramconf/dramconf.c
CC plat/renesas/rcar/drivers/memdrv/rcar_printf.c
CC plat/renesas/rcar/rcar_topology.c
CC plat/renesas/rcar/aarch64/rcar_common.c
CC plat/renesas/rcar/aarch64/rcar_drivers_common.c
CC plat/renesas/rcar/drivers/pwrc/rcar_pwrc.c
CC plat/renesas/rcar/drivers/cpld/ulcb_cpld.c
CC plat/renesas/rcar/drivers/wait/micro_wait.c
CC plat/common/plat_psci_common.c
CC plat/compat/plat_pm_compat.c
CC plat/compat/plat_topology_compat.c
CC bl31/bl31_main.c
CC bl31/interrupt_mgmt.c
CC bl31/bl31_context_mgmt.c
CC common/runtime_svc.c
CC services/arm_arch_svc/arm_arch_svc_setup.c
CC services/std_svc/std_svc_setup.c
CC lib/el3_runtime/cpu_data_array.c
CC lib/el3_runtime/aarch64/context_mgmt.c
CC lib/cpus/errata_report.c
CC lib/psci/psci_off.c
CC lib/psci/psci_on.c
CC lib/psci/psci_suspend.c
CC lib/psci/psci_common.c
CC lib/psci/psci_main.c
CC lib/psci/psci_setup.c
CC lib/psci/psci_system_off.c
CC lib/psci/psci_mem_protect.c
CC lib/locks/bakery/bakery_lock_coherent.c
CC lib/extensions/spe/spe.c
CC services/spd/opteed/opteed_common.c
CC services/spd/opteed/opteed_main.c
CC services/spd/opteed/opteed_pm.c
CC common/bl_common.c
CC common/tf_log.c
CC common/tf_printf.c
CC common/tf_snprintf.c
CC plat/common/plat_bl_common.c
CC plat/common/plat_log_common.c
CC plat/common/aarch64/plat_common.c
CC lib/stdlib/abort.c
CC lib/stdlib/assert.c
CC lib/stdlib/exit.c
CC lib/stdlib/mem.c
CC lib/stdlib/printf.c
CC lib/stdlib/putchar.c
CC lib/stdlib/puts.c
CC lib/stdlib/sscanf.c
CC lib/stdlib/strchr.c
CC lib/stdlib/strcmp.c
CC lib/stdlib/strlen.c
CC lib/stdlib/strncmp.c
CC lib/stdlib/strnlen.c
CC lib/stdlib/subr_prf.c
CC lib/stdlib/timingsafe_bcmp.c
CC plat/renesas/rcar/drivers/iic_dvfs/iic_dvfs.c
CC lib/xlat_tables_v2/aarch64/xlat_tables_arch.c
CC lib/xlat_tables_v2/xlat_tables_internal.c
AS lib/cpus/aarch64/aem_generic.S
AS lib/cpus/aarch64/cortex_a53.S
AS lib/cpus/aarch64/cortex_a57.S
AS plat/renesas/rcar/drivers/memdrv/rcar_console.S
AS plat/renesas/rcar/aarch64/rcar_helpers.S
AS plat/renesas/rcar/drivers/pwrc/rcar_call_sram.S
AS bl31/aarch64/bl31_entrypoint.S
AS bl31/aarch64/runtime_exceptions.S
AS bl31/aarch64/crash_reporting.S
AS plat/common/aarch64/platform_mp_stack.S
AS lib/el3_runtime/aarch64/cpu_data.S
AS lib/cpus/aarch64/cpu_helpers.S
AS lib/locks/exclusive/aarch64/spinlock.S
AS lib/psci/aarch64/psci_helpers.S
AS lib/el3_runtime/aarch64/context.S
AS lib/cpus/aarch64/wa_cve_2017_5715_bpiall.S
AS lib/cpus/aarch64/wa_cve_2017_5715_mmu.S
AS services/spd/opteed/opteed_helpers.S
AS common/aarch64/debug.S
AS lib/aarch64/cache_helpers.S
AS lib/aarch64/misc_helpers.S
AS plat/common/aarch64/platform_helpers.S
AS plat/compat/aarch64/plat_helpers_compat.S
PP bl31/bl31.ld.S
LD build/rcar/release/bl31/bl31.elf
SREC build/rcar/release/bl31.srec
BIN build/rcar/release/bl31.bin
Built build/rcar/release/bl31.bin successfully
OD build/rcar/release/bl31/bl31.dump

Related

Mac GridLabD installation error at % make -j8

I am trying to build GridLabD on my mac, but get a range or warnings and errors at the step "% make -j8". It is a long log, but below is how it starts (couldn't find gridlabd tag). I followed steps in Is it possible to run GridLab-D on macOS Catalina?, but got the same error at the "make" command. I appreciate any help.
% make -j8
/bin/bash -c "source utilities/build_number . gldcore/build.h"
Updating gldcore/build.h: revision 19053 (d7f83006:develop:Mod)
/Users/hei06j/Documents/repositories/remote/gridlab-d
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
CXX gldcore/gridlabd-convert.o
CC gldcore/gridlabd-instance_slave.o
CC gldcore/gridlabd-interpolate.o
CXX gldcore/gridlabd-job.o
CC gldcore/gridlabd-kml.o
CC gldcore/gridlabd-legal.o
CC gldcore/gridlabd-linkage.o
CXX gldcore/gridlabd-link.o
CC gldcore/gridlabd-load.o
CC gldcore/gridlabd-loadshape.o
CXX gldcore/gridlabd-load_xml.o
CXX gldcore/gridlabd-load_xml_handle.o
CC gldcore/gridlabd-local.o
CXX gldcore/gridlabd-lock.o
CC gldcore/gridlabd-main.o
CC gldcore/gridlabd-match.o
CC gldcore/gridlabd-matlab.o
CC gldcore/gridlabd-module.o
CC gldcore/gridlabd-object.o
CC gldcore/gridlabd-output.o
CC gldcore/gridlabd-property.o
CC gldcore/gridlabd-random.o
CC gldcore/gridlabd-realtime.o
CXX gldcore/gridlabd-sanitize.o
CC gldcore/gridlabd-save.o
CC gldcore/gridlabd-schedule.o
CC gldcore/gridlabd-server.o
CXX gldcore/gridlabd-setup.o
In file included from gldcore/load_xml.cpp:15:
In file included from ./gldcore/platform.h:57:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/math.h:309:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:420:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:37:
./version:1:3: error: invalid preprocessing directive
# $Id: VERSION 858 2008-08-28 21:06:13Z d3g637 $
^
./version:2:1: error: C++ requires a type specifier for all declarations
MAJOR=3
^
./version:2:8: error: expected ';' after top level declarator
MAJOR=3
^
In file included from gldcore/convert.cpp:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/math.h:309:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:420:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:37:
./version:1:3: error: invalid preprocessing directive
# $Id: VERSION 858 2008-08-28 21:06:13Z d3g637 $
^
./version:2:1: error: C++ requires a type specifier for all declarations
MAJOR=3
^
In file included from gldcore/load_xml_handle.cpp:18:
In file included from ./gldcore/platform.h:57:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/math.h:309:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:420:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:37:
./version:./version1::32:: 8: error: error: invalid preprocessing directive
expected ';' after top level declarator
MAJOR=3
^
# $Id: VERSION 858 2008-08-28 21:06:13Z d3g637 $
^
./version:2:1: error: C++ requires a type specifier for all declarations
MAJOR=3
^
./version:2:8: error: expected ';' after top level declarator
MAJOR=3
^
In file included from gldcore/setup.cpp:4:
In file included from ./gldcore/gridlabd.h:91:
In file included from ./gldcore/platform.h:57:
In file included from
...

How can I compile iOS ARM assembly code from the command line?

I'm trying to compile an iOS project that contains ARM code using the command line.
Here is the command line:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/as -arch armv6 engines/scumm/smush/codec47ARM.s -o engines/scumm/smush/codec47ARM.o
...and here are the errors:
engines/scumm/smush/codec47ARM.s:29:Unknown pseudo-op: .global
engines/scumm/smush/codec47ARM.s:29:Rest of line ignored. 1st junk character valued 95 (_).
engines/scumm/smush/codec47ARM.s:43:bad instruction `STMFD r13!,{r2,r4-r11,R14}'
engines/scumm/smush/codec47ARM.s:45:bad instruction `LDR r4,[r13,#40]'
engines/scumm/smush/codec47ARM.s:48:bad instruction `SUB r4,r4,#0xF8'
engines/scumm/smush/codec47ARM.s:55:bad instruction `ADD r7,r2,#7'
engines/scumm/smush/codec47ARM.s:56:bad instruction `MOV r7,r7,LSR#3'
If I try to compile with gcc (or clang), I receive the following errors:
engines/scumm/smush/codec47ARM.s:162:2: error: invalid instruction
LDREQB r6,[r1],#1 # r6 = t = *_d_src++
^
engines/scumm/smush/codec47ARM.s:279:2: error: invalid instruction
LDREQB r6,[r1],#1 # r6 = t = *_d_src++
^
engines/scumm/smush/codec47ARM.s:330:2: error: invalid instruction
LDRLTB r6,[r4,r6] # r6 = t = _paramPtr[code]
^
What am I doing wrong? I believe that ARMv6 should support MOV, ADD, etc.

Building a C library (GMP) for arm64 iOS

I'm trying to build a C library (GMP 6.0.0) for arm64 for use on iOS. I'm running the configure script with the invocation below (compiler is as found using xcrun --find).
./configure \
CC="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" \
CPP="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -E" \
CPPFLAGS="-target arm64-apple-darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/ -miphoneos-version-min=7.0" \
--host=aarch64-apple-darwin
However this fails at the following line ("long long reliability test 1"):
checking compiler /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -O2 -pedantic -target arm64-apple-darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/ -miphoneos-version-min=7.0... no, long long reliability test 1
configure: error: could not find a working compiler, see config.log for details
Full config.log available here. It shows multiple warning and errors for the long long reliability test compile, including the following:
conftest.c:9:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
^
conftest.c:10:44: error: implicit declaration of function 'h' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
^
conftest.c:10:48: error: implicit declaration of function 'g' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
^
conftest.c:10:100: warning: control reaches end of non-void function [-Wreturn-type]
for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
^
Using --host=none it works fine, but I'd really like to figure out how to build it with assembly optimized for arm64.
My system is x86_64-apple-darwin13.1.0 (or coreisbr-apple-darwin13.1.0 according to config.guess), an early '11 Core i7 MBP running OS X v10.9.2. I'm using Xcode 5.1 (5B130a).
Any help appreciated.
EDIT 1
Compiling for ARMv7 passes configure, but fails on make (full configure/make output here), apparently while compiling some assembly:
tmp-dive_1.s:165:18: error: unexpected token in '.section' directive
.section .rodata
^
EDIT 2
#MarcGlisse: By forcing clang to ignore the errors as suggested (-Wno-...) arm64 passes configure, but then fails on make (full output here):
tmp-mul_1.s:59:2: error: unrecognized instruction mnemonic
bcc Lfi1
^
tmp-mul_1.s:60:2: error: unrecognized instruction mnemonic
beq Lfi2
^
As a side note: these commits, I assume intended to remove the need for suppressing the error, don't seem to work i.e. I get the same error when removing the supression.
For armv7, using these commits as suggested fixes the .section error, but make fails later on with the following (full output here):
tmp-mode1o.s:64:2: error: unknown directive
.protected ___gmp_binvert_limb_table
^
EDIT 3
Using the suggested edits, armv7, armv7s, i386 and x86_64 now all compile with assembly!
For arm64 the edits get it past the previous error, but now gives several errors about an invalid input constraint 'rZ', all in the same file (full output here):
divrem_1.c:237:5: error: invalid input constraint 'rZ' in asm
udiv_qrnnd_preinv (*qp, r, r, nshift, d, dinv);
^
../gmp-impl.h:3062:2: note: expanded from macro 'udiv_qrnnd_preinv'
add_ssaaaa (_qh, _ql, _qh, _ql, (nh) + 1, (nl)); \
^
../longlong.h:551:7: note: expanded from macro 'add_ssaaaa'
: "rZ" (ah), "rZ" (bh), "%r" (al), "rI" (bl) __CLOBBER_CC)
EDIT 4
After commenting out add_ssaaaa and sub_ddmmss in longlong.h and editing some more assembly instructions in gcd_1.asm (blo to b.lo etc.), it now fails with several of the following errors (full output here):
tmp-invert_limb.s:75:22: error: immediate value expected for shifter operand
add x1, x1, x2, lsr 1
^
tmp-invert_limb.s:75:22: error: invalid operand for instruction
add x1, x1, x2, lsr 1
^
I'll post a total diff later.
EDIT 5
Ok, that gets us another step further, but it now hits into (full output here):
tmp-invert_limb.s:52:2: error: ADR/ADRP relocations must be GOT relative
adrp x1, approx_tab
^
If this keeps going it might be better to continue this via email.
"Support for ARM64 alias Aarch64 alias ARMv8"
https://gmplib.org/gmp6.0
Copyright issues aside...
GMP may not be compatible with Apple's proprietary CPU, and may not be compatible with Clang/LLVM. Being a GNU project it is probably more thoroughly tested with GCC on non-proprietary chipsets.
A quick search shows historically at least there have been issues compiling GMP with clang.
You really should email the GMP community and ask for help on this one.

Error while build ffmpeg for iOS

I'm trying to build fmmpeg for iOS with the following config:
./configure --prefix=build/armv7 --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --enable-avutil --enable-avresample --enable-cross-compile --sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk" --target-os=darwin --cc=gcc --extra-cflags="-arch armv7 -mfpu=neon -miphoneos-version-min=6.0" --extra-ldflags="-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=6.0" --arch=arm --cpu=cortex-a9 --enable-pic
when i try to make it i'm receiving the follow error:
AS libavcodec/arm/vc1dsp_neon.o
libavcodec/arm/vc1dsp_neon.S:751:10: error: unexpected token in argument list
ra .dn d28.i8
^
libavcodec/arm/vc1dsp_neon.S:752:10: error: unexpected token in argument list
rb .dn d29.i8
^
libavcodec/arm/vc1dsp_neon.S:753:10: error: unexpected token in argument list
rc .dn d30.i8
^
libavcodec/arm/vc1dsp_neon.S:754:10: error: unexpected token in argument list
rd .dn d31.i8
^
libavcodec/arm/vc1dsp_neon.S:757:14: error: invalid operand for instruction
vmov ra, #4
^
libavcodec/arm/vc1dsp_neon.S:758:14: error: invalid operand for instruction
vmov rb, #53
^
libavcodec/arm/vc1dsp_neon.S:759:14: error: invalid operand for instruction
vmov rc, #18
^
libavcodec/arm/vc1dsp_neon.S:760:14: error: invalid operand for instruction
vmov rd, #3
^
libavcodec/arm/vc1dsp_neon.S:864:10: error: unexpected token in argument list
ra .dn d28.i16
^
libavcodec/arm/vc1dsp_neon.S:865:10: error: unexpected token in argument list
rb .dn d29.i16
^
what could be the error?
Try adding the flags --disable-neon and --disable-armv5te.
BTW, the following set of flags does the trick for AMRv7:
'--arch=arm',
'--enable-pic',
"--extra-cflags='-arch armv7 -miphoneos-version-min=6.0'",
"--extra-ldflags='-arch armv7 -miphoneos-version-min=6.0'",
'--disable-neon',
'--enable-optimizations',
'--disable-debug',
'--disable-armv5te',
'--disable-armv6',
'--disable-armv6t2',
'--disable-ffmpeg',
'--disable-ffplay',
'--disable-ffserver',
'--disable-ffprobe',
'--disable-doc',
'--disable-bzlib',
'--target-os=darwin',
'--enable-cross-compile',
'--enable-version3',
Or, event better, you change the version of gas-preprocessor you have to the libAV maintained version: https://github.com/libav/gas-preprocessor
Hope this helps.

Can't install Imagemagick on Mountain Lion

Yesterday I updated to Mountain Lion and I wanted to start my rails app and had some problems with Rmagick gem. After reading on the net I did the following :
Installed Xcode 4.4
Installed developper tools
Installed Xquartz
Uninstalled imagemagick using brew
Installed imagemagick with brew
During this installation I receive an error :
coders/svg.c:93:10: fatal error: 'librsvg/rsvg.h' file not found
Full log
==> Downloading http://downloads.sf.net/project/machomebrew/mirror/ImageMagick-6.7.7- 6.tar.bz2
Already downloaded: /Library/Caches/Homebrew/imagemagick-6.7.7-6.tar.bz2
==> Patching
patching file configure
Hunk #1 succeeded at 32371 (offset 447 lines).
==> ./configure --disable-osx-universal-binary --without-perl --prefix=/usr/local/Cellar/imagemagick/6.7.7-6 --enable-shared --disable-st
==> make install
/bin/sh ./config/mkinstalldirs . ltdl/
cp ./ltdl/argz_.h ltdl/argz.h-t
mv ltdl/argz.h-t ltdl/argz.h
make install-am
CC ltdl/argz.lo
CC coders/coders_tga_la-tga.lo
CC coders/coders_thumbnail_la-thumbnail.lo
CC coders/coders_tile_la-tile.lo
CC coders/coders_tim_la-tim.lo
CC coders/coders_ttf_la-ttf.lo
CC coders/coders_txt_la-txt.lo
CC coders/coders_uil_la-uil.lo
CC coders/coders_url_la-url.lo
CC coders/coders_uyvy_la-uyvy.lo
CC coders/coders_vicar_la-vicar.lo
CC coders/coders_vid_la-vid.lo
CC coders/coders_viff_la-viff.lo
CC coders/coders_wbmp_la-wbmp.lo
CC coders/coders_wpg_la-wpg.lo
CC coders/coders_xbm_la-xbm.lo
CC coders/coders_xc_la-xc.lo
CC coders/coders_xcf_la-xcf.lo
CC coders/coders_xpm_la-xpm.lo
CC coders/coders_xps_la-xps.lo
CC coders/coders_ycbcr_la-ycbcr.lo
CC coders/coders_yuv_la-yuv.lo
CC coders/coders_jpeg_la-jpeg.lo
CC coders/coders_jp2_la-jp2.lo
CC coders/coders_png_la-png.lo
CC coders/coders_ept_la-ept.lo
CC coders/coders_tiff_la-tiff.lo
CC coders/coders_x_la-x.lo
CC coders/coders_xwd_la-xwd.lo
CC coders/coders_aai_la-aai.lo
CC magick/magick_libMagickCore_la-accelerate.lo
CC magick/magick_libMagickCore_la-animate.lo
CC magick/magick_libMagickCore_la-annotate.lo
CC magick/magick_libMagickCore_la-artifact.lo
CC magick/magick_libMagickCore_la-attribute.lo
CC magick/magick_libMagickCore_la-blob.lo
CC magick/magick_libMagickCore_la-cache.lo
CC magick/magick_libMagickCore_la-cache-view.lo
CC magick/magick_libMagickCore_la-cipher.lo
CC magick/magick_libMagickCore_la-client.lo
CC magick/magick_libMagickCore_la-coder.lo
CC magick/magick_libMagickCore_la-color.lo
CC magick/magick_libMagickCore_la-colormap.lo
CC magick/magick_libMagickCore_la-colorspace.lo
CC magick/magick_libMagickCore_la-compare.lo
CC magick/magick_libMagickCore_la-composite.lo
CC magick/magick_libMagickCore_la-compress.lo
CC magick/magick_libMagickCore_la-configure.lo
CC magick/magick_libMagickCore_la-constitute.lo
CC magick/magick_libMagickCore_la-decorate.lo
CC magick/magick_libMagickCore_la-delegate.lo
CC magick/magick_libMagickCore_la-deprecate.lo
CC magick/magick_libMagickCore_la-display.lo
CC magick/magick_libMagickCore_la-distort.lo
CC magick/magick_libMagickCore_la-draw.lo
CC magick/magick_libMagickCore_la-effect.lo
CC magick/magick_libMagickCore_la-enhance.lo
CC magick/magick_libMagickCore_la-exception.lo
CC magick/magick_libMagickCore_la-feature.lo
CC magick/magick_libMagickCore_la-fourier.lo
CC magick/magick_libMagickCore_la-fx.lo
CC magick/magick_libMagickCore_la-gem.lo
CC magick/magick_libMagickCore_la-geometry.lo
CC magick/magick_libMagickCore_la-hashmap.lo
CC magick/magick_libMagickCore_la-histogram.lo
CC magick/magick_libMagickCore_la-identify.lo
CC magick/magick_libMagickCore_la-image.lo
CC magick/magick_libMagickCore_la-image-view.lo
CC magick/magick_libMagickCore_la-layer.lo
CC magick/magick_libMagickCore_la-list.lo
CC magick/magick_libMagickCore_la-locale.lo
CC magick/magick_libMagickCore_la-log.lo
CC magick/magick_libMagickCore_la-magic.lo
CC magick/magick_libMagickCore_la-magick.lo
CC magick/magick_libMagickCore_la-matrix.lo
CC magick/magick_libMagickCore_la-memory.lo
CC magick/magick_libMagickCore_la-mime.lo
CC magick/magick_libMagickCore_la-module.lo
CC magick/magick_libMagickCore_la-monitor.lo
CC magick/magick_libMagickCore_la-montage.lo
CC magick/magick_libMagickCore_la-morphology.lo
CC magick/magick_libMagickCore_la-option.lo
CC magick/magick_libMagickCore_la-paint.lo
CC magick/magick_libMagickCore_la-pixel.lo
CC magick/magick_libMagickCore_la-policy.lo
CC magick/magick_libMagickCore_la-PreRvIcccm.lo
CC magick/magick_libMagickCore_la-prepress.lo
CC magick/magick_libMagickCore_la-property.lo
CC magick/magick_libMagickCore_la-profile.lo
CC magick/magick_libMagickCore_la-quantize.lo
CC magick/magick_libMagickCore_la-quantum.lo
CC magick/magick_libMagickCore_la-quantum-export.lo
CC magick/magick_libMagickCore_la-quantum-import.lo
CC magick/magick_libMagickCore_la-random.lo
CC magick/magick_libMagickCore_la-registry.lo
CC magick/magick_libMagickCore_la-resize.lo
CC magick/magick_libMagickCore_la-resample.lo
CC magick/magick_libMagickCore_la-resource.lo
CC magick/magick_libMagickCore_la-segment.lo
CC magick/magick_libMagickCore_la-semaphore.lo
CC magick/magick_libMagickCore_la-shear.lo
CC magick/magick_libMagickCore_la-signature.lo
CC magick/magick_libMagickCore_la-splay-tree.lo
CC magick/magick_libMagickCore_la-static.lo
CC magick/magick_libMagickCore_la-statistic.lo
CC magick/magick_libMagickCore_la-stream.lo
CC magick/magick_libMagickCore_la-string.lo
CC magick/magick_libMagickCore_la-thread.lo
CC magick/magick_libMagickCore_la-timer.lo
CC magick/magick_libMagickCore_la-token.lo
CC magick/magick_libMagickCore_la-transform.lo
CC magick/magick_libMagickCore_la-threshold.lo
CC magick/magick_libMagickCore_la-type.lo
CC magick/magick_libMagickCore_la-utility.lo
CC magick/magick_libMagickCore_la-version.lo
CC magick/magick_libMagickCore_la-widget.lo
CC magick/magick_libMagickCore_la-xml-tree.lo
CC magick/magick_libMagickCore_la-xwindow.lo
CC ltdl/loaders/ltdl_libltdlc_la-preopen.lo
CC ltdl/ltdl_libltdlc_la-lt__alloc.lo
CC ltdl/ltdl_libltdlc_la-lt_dlloader.lo
CC ltdl/ltdl_libltdlc_la-lt_error.lo
CC ltdl/ltdl_libltdlc_la-ltdl.lo
CC ltdl/ltdl_libltdlc_la-slist.lo
CC ltdl/loaders/dlopen.lo
CC coders/coders_art_la-art.lo
CC coders/coders_avs_la-avs.lo
CC coders/coders_bgr_la-bgr.lo
CC coders/coders_bmp_la-bmp.lo
CC coders/coders_braille_la-braille.lo
CC coders/coders_cals_la-cals.lo
CC coders/coders_caption_la-caption.lo
CC coders/coders_cin_la-cin.lo
CC coders/coders_cip_la-cip.lo
CC coders/coders_clip_la-clip.lo
CC coders/coders_cmyk_la-cmyk.lo
CC coders/coders_cut_la-cut.lo
CC coders/coders_dcm_la-dcm.lo
CC coders/coders_dds_la-dds.lo
CC coders/coders_debug_la-debug.lo
CC coders/coders_dib_la-dib.lo
CC coders/coders_dng_la-dng.lo
CC coders/coders_dot_la-dot.lo
CC coders/coders_dpx_la-dpx.lo
CC coders/coders_fax_la-fax.lo
CC coders/coders_fd_la-fd.lo
CC coders/coders_fits_la-fits.lo
CC coders/coders_gif_la-gif.lo
CC coders/coders_gradient_la-gradient.lo
CC coders/coders_gray_la-gray.lo
CC coders/coders_hald_la-hald.lo
CC coders/coders_hdr_la-hdr.lo
CC coders/coders_histogram_la-histogram.lo
CC coders/coders_hrz_la-hrz.lo
CC coders/coders_html_la-html.lo
CC coders/coders_icon_la-icon.lo
CC coders/coders_inline_la-inline.lo
CC coders/coders_info_la-info.lo
CC coders/coders_ipl_la-ipl.lo
CC coders/coders_label_la-label.lo
CC coders/coders_mac_la-mac.lo
CC coders/coders_magick_la-magick.lo
CC coders/coders_map_la-map.lo
CC coders/coders_mat_la-mat.lo
CC coders/coders_matte_la-matte.lo
CC coders/coders_meta_la-meta.lo
CC coders/coders_miff_la-miff.lo
CC coders/coders_mono_la-mono.lo
CC coders/coders_mpc_la-mpc.lo
CC coders/coders_mpeg_la-mpeg.lo
CC coders/coders_mpr_la-mpr.lo
CC coders/coders_msl_la-msl.lo
CC coders/coders_mtv_la-mtv.lo
CC coders/coders_mvg_la-mvg.lo
CC coders/coders_null_la-null.lo
CC coders/coders_otb_la-otb.lo
CC coders/coders_palm_la-palm.lo
CC coders/coders_pango_la-pango.lo
CC coders/coders_pattern_la-pattern.lo
CC coders/coders_pcd_la-pcd.lo
CC coders/coders_pcl_la-pcl.lo
CC coders/coders_pcx_la-pcx.lo
CC coders/coders_pdb_la-pdb.lo
CC coders/coders_pdf_la-pdf.lo
CC coders/coders_pes_la-pes.lo
CC coders/coders_pict_la-pict.lo
CC coders/coders_pix_la-pix.lo
CC coders/coders_plasma_la-plasma.lo
CC coders/coders_pnm_la-pnm.lo
CC coders/coders_preview_la-preview.lo
CC coders/coders_ps_la-ps.lo
CC coders/coders_ps2_la-ps2.lo
CC coders/coders_ps3_la-ps3.lo
CC coders/coders_psd_la-psd.lo
CC coders/coders_pwp_la-pwp.lo
CC coders/coders_raw_la-raw.lo
CC coders/coders_rgb_la-rgb.lo
CC coders/coders_rla_la-rla.lo
CC coders/coders_rle_la-rle.lo
CC coders/coders_scr_la-scr.lo
CC coders/coders_sct_la-sct.lo
CC coders/coders_sfw_la-sfw.lo
CC coders/coders_sgi_la-sgi.lo
CC coders/coders_stegano_la-stegano.lo
CC coders/coders_sun_la-sun.lo
CC coders/coders_svg_la-svg.lo
CC wand/wand_libMagickWand_la-animate.lo
coders/svg.c:93:10: fatal error: 'librsvg/rsvg.h' file not found
#include "librsvg/rsvg.h"
^
CC wand/wand_libMagickWand_la-compare.lo
1 error generated.
make[1]: *** [coders/coders_svg_la-svg.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [install] Error 2
config.log was copied to /Users/dries/Library/Logs/Homebrew
==> Build Environment
HOMEBREW_VERSION: 0.9.2
HEAD: 20ad5702c5bdb89e7a52c0b7407d58dbbf6a9afd
CPU: quad-core 64-bit arrandale
OS X: 10.8-x86_64
Xcode: 4.4
CLT: 4.4.0.0.1.1249367152
X11: 2.7.2 # /opt/X11
CC: /usr/bin/clang
CXX: /usr/bin/clang++ => /usr/bin/clang
LD: /usr/bin/clang
CFLAGS: -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.8
CXXFLAGS: -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.8
CPPFLAGS: -I/usr/local/Cellar/gettext/0.18.1.1/include -isystem /usr/local/include -I/opt/X11/include
CMAKE_PREFIX_PATH: /opt/X11:/opt/X11
LDFLAGS: -L/usr/local/Cellar/gettext/0.18.1.1/lib -L/usr/local/lib -L/opt/X11/lib
MACOSX_DEPLOYMENT_TARGET: 10.8
MAKEFLAGS: -j4
PKG_CONFIG_PATH: /opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:/usr/local/Library/Homebrew/pkgconfig
Error: Failed executing: make install (imagemagick.rb:137)
These existing issues may help you:
https://github.com/mxcl/homebrew/issues/13618
https://github.com/mxcl/homebrew/issues/13638
Otherwise, this may help you fix or report the issue:
https://github.com/mxcl/homebrew/wiki/bug-fixing-checklist
For the moment I'm running out of possible steps I can take. Somebody knows what is wrong with this installation?
I wasted a lot of time for this one. In the end I did as stated on this site:
http://robots.thoughtbot.com/post/27985816073/the-hitchhikers-guide-to-riding-a-mountain-lion
And (the thing that seemed to fix it for me) was running brew doctor and fixing every single issue until it did not complain any longer. Now I have imagemagick installed. Hope it helps.
Yeah I also encounters the problem,I think make is the cause of the conflict.
Before install, I use brew doctor to check env, it shows me following error :
Your compilers are different from the standard versions for your Xcode.
If you have Xcode 4.3 or newer, you should install the Command Line Tools for
Xcode from within Xcode's Download preferences.
Otherwise, you should reinstall Xcode.
If you install Xcode-4.4 beforehand, then install osx-GCC-4.2, this mistake will appear .
I try to reinstall Xcode-4.4, but it doesn't work. So I just direct compiler installation from the source code.
curl -O ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
tar -zxvf ImageMagick.tar.gz
cd ImageMagick-6.7.8-8
./configure --prefix=/usr/local
make && make install
And then ImageMagick works. But this may lead file storage location has a problem, it will produce some warnings when you use brew doctor to check .
Recently I tried to reset xcode-path to solve version confict
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
I think this can be a way to solve make conflict.
If anyone reading this is using macports instead of homebrew, you can install ImageMagick (After installing Xcode and the command line tools) with the following command:
sudo port install ImageMagick

Resources