I'm trying to cross compile a helloworld kernel module with specifications:
host: intel x86 32 bit, linux-3.0.0
target: ARM machine (Parrot AR.Drone), linux-2.6.27.47
I'm using the makefile:
PWD := $(shell pwd)
obj-m := test.o
all:
$(MAKE) -C /path/to/kernel M=$(PWD) CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm modules
Where arm-none-linux-gnueabi- is the prefix of the arm toolchain.
Using the 2.6.27.47 kernel from kernel.org, this gives following errors:
make -C /home/jens/linux-2.6.27.47 M=/home/jens/test CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm KBUILD_VERBOSE=1 modules
make[1]: Entering directory `/home/jens/linux-2.6.27.47'
mkdir -p /home/jens/test/.tmp_versions ; rm -f /home/jens/test/.tmp_versions/*
WARNING: Symbol version dump /home/jens/linux-2.6.27.47/Module.symvers
is missing; modules will have no dependencies and modversions.
make -f scripts/Makefile.build obj=/home/jens/test
arm-none-linux-gnueabi-gcc -Wp,-MD,/home/jens/test/.test.o.d -nostdinc -isystem /opt/CodeSourcery/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/include -D__KERNEL__ -Iinclude -I/home/jens/linux-2.6.27.47/arch/arm/include -include include/linux/autoconf.h -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -fno-delete-null-pointer-checks -O2 -marm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mabi=apcs-gnu -mno-thumb-interwork -msoft-float -Uarm -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -pg -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(test)" -D"KBUILD_MODNAME=KBUILD_STR(test)" -c -o /home/jens/test/.tmp_test.o /home/jens/test/test.c
In file included from include/asm/system.h:10,
from include/asm/processor.h:17,
from include/linux/prefetch.h:14,
from include/linux/list.h:6,
from include/linux/module.h:9,
from /home/jens/test/test.c:1:
include/linux/kernel.h:195: warning: 'regparm' attribute directive ignored
include/linux/kernel.h:197: warning: 'regparm' attribute directive ignored
include/linux/kernel.h:221: warning: 'regparm' attribute directive ignored
In file included from include/linux/thread_info.h:47,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:29,
from include/linux/time.h:8,
from include/linux/stat.h:60,
from include/linux/module.h:10,
from /home/jens/test/test.c:1:
include/asm/thread_info.h:172: error: invalid register name for 'current_stack_pointer'
In file included from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /home/jens/test/test.c:1:
include/linux/mmzone.h:18:26: error: linux/bounds.h: No such file or directory
include/linux/mmzone.h:197:5: warning: "MAX_NR_ZONES" is not defined
In file included from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /home/jens/test/test.c:1:
include/linux/mmzone.h:218: error: 'MAX_NR_ZONES' undeclared here (not in a function)
In file included from include/linux/rwsem.h:22,
from include/linux/notifier.h:14,
from include/linux/memory_hotplug.h:6,
from include/linux/mmzone.h:560,
from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /home/jens/test/test.c:1:
include/asm/rwsem.h:48: warning: 'regparm' attribute directive ignored
include/asm/rwsem.h:50: warning: 'regparm' attribute directive ignored
include/asm/rwsem.h:52: warning: 'regparm' attribute directive ignored
include/asm/rwsem.h:54: warning: 'regparm' attribute directive ignored
In file included from include/asm/smp.h:12,
from include/linux/smp.h:28,
from include/linux/topology.h:33,
from include/linux/mmzone.h:683,
from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /home/jens/test/test.c:1:
include/asm/mpspec.h:9:25: error: mach_mpspec.h: No such file or directory
In file included from include/asm/smp.h:12,
from include/linux/smp.h:28,
from include/linux/topology.h:33,
from include/linux/mmzone.h:683,
from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /home/jens/test/test.c:1:
include/asm/mpspec.h:36: error: 'MAX_MP_BUSSES' undeclared here (not in a function)
In file included from include/asm/smp.h:15,
from include/linux/smp.h:28,
from include/linux/topology.h:33,
from include/linux/mmzone.h:683,
from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /home/jens/test/test.c:1:
include/asm/io_apic.h:149: error: 'MAX_IRQ_SOURCES' undeclared here (not in a function)
In file included from include/linux/smp.h:28,
from include/linux/topology.h:33,
from include/linux/mmzone.h:683,
from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /home/jens/test/test.c:1:
include/asm/smp.h:187:28: error: mach_apicdef.h: No such file or directory
In file included from include/linux/smp.h:28,
from include/linux/topology.h:33,
from include/linux/mmzone.h:683,
from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /home/jens/test/test.c:1:
include/asm/smp.h: In function 'hard_smp_processor_id':
include/asm/smp.h:191: error: implicit declaration of function 'GET_APIC_ID'
make[2]: *** [/home/jens/test/test.o] Error 1
make[1]: *** [_module_/home/jens/test] Error 2
make[1]: Leaving directory `/home/jens/linux-2.6.27.47'
make: *** [test_arm2] Error 2
It's here that I'm stuck.
My problem was, like sessyargc.jp suggested, due to a bad configuration. I had applied the default configuration, while I was supposed to use an arm-specific configuration. Using this, the compile problems were solved.
Related
image: docker tensorflow/tensorflow:1.10.0-devel-gpu-py3
os: ubuntu 16.04
cuda: 9.0.176
ffmpeg pulled from github and nv-codec-headers downloaded from videolan, both the latest version
step 1: cd /nv-codec-headers and make && make install
step 2: cd /ffmpeg (the ffmpeg source) , ./configure --extra-cflags=-I/usr/local/include --extra-ldconfig=-L/usr/local/lib --enable-gpl --enable-lbopus --enable-librtmp --enable-libx264 --enable-nonfree --enable-libnpp --enable-cuvid --enable-nvenc --enable-cuda
output: ERROR: libnpp not found
I also tried compiling ffmpeg with cuda 10, but it seemed the same problem. but if I deleted "--enable-libnpp" then ./configure works.
the config.log has many errors:
ERROR: libnpp not found
root#336584ef0a4e:~/ffmpeg_sources/ffmpeg# cat ./ffbuild/config.log | grep error error_resilience
error_resilience
strerror_r
error_resilience
strerror_r
error_color=''
error_resilience_select='me_cmp'
h264_decoder_suggest='error_resilience'
mpeg_er_select='error_resilience'
wmv2_decoder_select='blockdsp error_resilience h263_decoder idctdsp intrax8 videodsp wmv2dsp'
3 #error "unsatisfied condition: __STDC_VERSION__ >= 201112L"
3 #error "unsatisfied condition: defined __UCLIBC__"
/tmp/ffconf.DiL4dMbF/test.c:3:2: error: #error "unsatisfied condition: defined __UCLIBC__"
#error "unsatisfied condition: defined __UCLIBC__"
3 #error "unsatisfied condition: defined __GLIBC__"
3 #error "unsatisfied condition: defined __UCLIBC__"
/tmp/ffconf.DiL4dMbF/test.c:3:2: error: #error "unsatisfied condition: defined __UCLIBC__"
#error "unsatisfied condition: defined __UCLIBC__"
3 #error "unsatisfied condition: defined __GLIBC__"
/tmp/ffconf.DiL4dMbF/test.c:2:11: error: 'localtime_r' undeclared here (not in a function)
3 #error "unsatisfied condition: defined(__PIC__) || defined(__pic__) || defined(PIC)"
/tmp/ffconf.DiL4dMbF/test.c:3:2: error: #error "unsatisfied condition: defined(__PIC__) || defined(__pic__) || defined(PIC)"
#error "unsatisfied condition: defined(__PIC__) || defined(__pic__) || defined(PIC)"
/tmp/ffconf.DiL4dMbF/test.c:1:20: fatal error: intrin.h: No such file or directory
nasm -Werror -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.asm
nasm -f elf64 -g -F dwarf -Werror -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.asm
nasm -f elf64 -g -F dwarf -Werror -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.asm
nasm -f elf64 -g -F dwarf -Werror -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.asm
nasm -f elf64 -g -F dwarf -Werror -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.asm
nasm -f elf64 -g -F dwarf -Werror -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.asm
/tmp/ffconf.DiL4dMbF/test.asm:1: error: unknown 'cpu' type 'amdnop'
/tmp/ffconf.DiL4dMbF/test.c:1:22: fatal error: arm_neon.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:26: fatal error: netinet/sctp.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:3:57: error: 'struct sockaddr' has no member named 'sa_len'
collect2: error: ld returned 1 exit status
/tmp/ffconf.DiL4dMbF/test.c:1:20: fatal error: atomic.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:22: fatal error: mbarrier.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:3:50: error: '_aligned_malloc' undeclared (first use in this function)
/tmp/ffconf.DiL4dMbF/test.c:3:45: error: 'arc4random' undeclared (first use in this function)
collect2: error: ld returned 1 exit status
check_func strerror_r
1 extern int strerror_r();
2 int main(void){ strerror_r(); }
/tmp/ffconf.DiL4dMbF/test.c:1:19: fatal error: conio.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:16: fatal error: io.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:23: fatal error: lzo/lzo1x.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:28: fatal error: mach/mach_time.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:20: fatal error: direct.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:23: fatal error: dxgidebug.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:18: fatal error: dxva.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:22: fatal error: dxva2api.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:16: fatal error: io.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:42: fatal error: libcrystalhd/libcrystalhd_if.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:25: fatal error: net/udplite.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:31: fatal error: valgrind/valgrind.h: No such file or directory
gcc: error: VideoToolbox: No such file or directory
gcc: error: unrecognized command line option '-framework'
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:36: fatal error: X11/extensions/XvMClib.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:35: fatal error: android/native_window.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:2:28: fatal error: media/NdkImage.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:3:37: fatal error: camera/NdkCameraManager.h: No such file or directory
gcc -Werror=missing-prototypes -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -I/root/ffmpeg_build/include -I/root/ffmpeg_build/include -I/usr/local/cuda/include -std=c11 -fomit-frame-pointer -c -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.m
gcc: error trying to exec 'cc1obj': execvp: No such file or directory
gcc -Werror=missing-prototypes -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -I/root/ffmpeg_build/include -I/root/ffmpeg_build/include -I/usr/local/cuda/include -std=c11 -fomit-frame-pointer -c -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.m
gcc: error trying to exec 'cc1obj': execvp: No such file or directory
gcc -Werror=missing-prototypes -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -I/root/ffmpeg_build/include -I/root/ffmpeg_build/include -I/usr/local/cuda/include -std=c11 -fomit-frame-pointer -c -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.m
gcc: error trying to exec 'cc1obj': execvp: No such file or directory
gcc -Werror=missing-prototypes -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -I/root/ffmpeg_build/include -I/root/ffmpeg_build/include -I/usr/local/cuda/include -std=c11 -fomit-frame-pointer -c -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.m
gcc: error trying to exec 'cc1obj': execvp: No such file or directory
gcc -Werror=missing-prototypes -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -I/root/ffmpeg_build/include -I/root/ffmpeg_build/include -I/usr/local/cuda/include -std=c11 -fomit-frame-pointer -c -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.m
gcc: error trying to exec 'cc1obj': execvp: No such file or directory
gcc -Werror=missing-prototypes -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -I/root/ffmpeg_build/include -I/root/ffmpeg_build/include -I/usr/local/cuda/include -std=c11 -fomit-frame-pointer -c -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.m
gcc: error trying to exec 'cc1obj': execvp: No such file or directory
gcc -Werror=missing-prototypes -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -I/root/ffmpeg_build/include -I/root/ffmpeg_build/include -I/usr/local/cuda/include -std=c11 -fomit-frame-pointer -c -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.m
gcc: error trying to exec 'cc1obj': execvp: No such file or directory
gcc -Werror=missing-prototypes -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -I/root/ffmpeg_build/include -I/root/ffmpeg_build/include -I/usr/local/cuda/include -std=c11 -fomit-frame-pointer -c -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.m
gcc: error trying to exec 'cc1obj': execvp: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:18: fatal error: d3d9.h: No such file or directory
pkg-config --exists --print-errors ffnvcodec >= 9.0.18.0
3 #error "unsatisfied condition: !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)"
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
pkg-config --exists --print-errors zlib
/tmp/ffconf.DiL4dMbF/test.c:1:19: fatal error: bzlib.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:18: fatal error: lzma.h: No such file or directory
collect2: error: ld returned 1 exit status
/tmp/ffconf.DiL4dMbF/test.c:1:17: fatal error: npp.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:17: fatal error: npp.h: No such file or directory
After installed a package named cuda-npp-, the problem was solved. For more information, you can come here
I am trying to install FFTW on my mac with OpenMP enabled. I initially had trouble configuring, but that issue was solved here.
Now after configuring I type "make" and I get the following error:
libtool: compile: mpicc -DHAVE_CONFIG_H -I. -I.. -I../kernel -I../dft -I../rdft -I../api -I../tests -I../libbench2 -O3 -fomit-frame-pointer -mtune=native -malign-double -fstrict-aliasing -fno-schedule-insns -ffast-math -Wa,-q -Wl,-no_compact_unwind -MT any-true.lo -MD -MP -MF .deps/any-true.Tpo -c any-true.c -o any-true.o
clang: error: unknown argument: '-malign-double'
clang: warning: -Wl,-no_compact_unwind: 'linker' input unused
clang: error: unsupported argument '-q' to option 'Wa,'
clang: warning: optimization flag '-fno-schedule-insns' is not supported
make[3]: *** [any-true.lo] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
What is the issue here and how can I solve it?
You could try passing the location of the gcc compiler its absolute path rather than the binary name, just as
CC=/usr/local/gcc-6.1.0/bin/gcc-6.1.0 ./configure --enable-mpi --enable-threads --enable-openmp
EDIT
After having a brief chat with OP, it looks like he omitted part of the error and the error came from the mpicc compiler used (due to --enable-mpi in the configure stage). According to the user, they were using OpenMPI and according to this FAQ the user can tune the C compiler by using the OMPI_CC environtment variable. So my suggestion was to build the FFTW library as
OMPI_CC=/usr/local/gcc-6.1.0/bin/gcc-6.1.0 make
In the newest gcc 4.9.1 package, after ./configure I ran make, and it failed with error message:
checking for x86_64-unknown-linux-gnu-gcc... /root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include
checking for suffix of object files... configure: error: in `/root/tar/gcc-4.9.1/x86_64-unknown-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
I checked the config.log in the x86_64-unknown-linux-gnu/libgcc/, and it said,
configure:3389: /root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include -o conftest -g -O2 conftest.c >&5
/root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory
configure:3392: $? = 1
configure:3580: checking for suffix of object files
configure:3602: /root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include -c -g -O2 conftest.c >&5
/root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory
configure:3606: $? = 1
configure: failed program was:
But obviously I have libmpc.so.2 in /usr/local/lib. What's wrong??
It looks like the problem is due to the fact that the default path /usr/local/lib is not included in the $LD_LIBRARY_PATH environment variable. Sorry for this stupid question...
This question already has answers here:
Error while installing ruby-1.8.7 on Fedora 15
(5 answers)
Closed 2 years ago.
Latest attempt at resolving install issues with stdout-rouge-fix.patch (as directed), resulted in the following:
[abu#Beelzebub Downloads]$ rvm install --patch stdout-rouge-fix.patch%0 ruby-1.8.7-p173
Installing Ruby from source to: /home/abu/.rvm/rubies/ruby-1.8.7-p173, this may take a while depending on your cpu(s)...
ruby-1.8.7-p173 - #fetching
ruby-1.8.7-p173 - #extracted to /home/abu/.rvm/src/ruby-1.8.7-p173 (already extracted)
Applying patch 'stdout-rouge-fix.patch' (located at /home/abu/Downloads/stdout-rouge-fix.patch)
ERROR: Error running 'patch -F25 -p0 -f <"/home/abu/Downloads/stdout-rouge-fix.patch"', please read /home/abu/.rvm/log/ruby-1.8.7-p173/patch.apply.stdout-rouge-fix.patch.log
ruby-1.8.7-p173 - #configuring
ruby-1.8.7-p173 - #compiling
ERROR: Error running 'make ', please read /home/abu/.rvm/log/ruby-1.8.7-p173/make.log
ERROR: There has been an error while running make. Halting the installation.
MAKE LOG
[2011-08-05 23:59:36] make
gcc -g -O2 -fPIC -DRUBY_EXPORT -D_GNU_SOURCE=1 -L. -rdynamic -Wl,-export-dynamic main.o libruby-static.a -lrt -ldl -lcrypt -lm -o miniruby
rbconfig.rb unchanged
gcc -shared -Wl,-soname,libruby.so.1.8 array.o bignum.o class.o compar.o dir.o dln.o enum.o enumerator.o error.o eval.o file.o gc.o hash.o inits.o io.o marshal.o math.o numeric.o object.o pack.o parse.o process.o prec.o random.o range.o re.o regex.o ruby.o signal.o sprintf.o st.o string.o struct.o time.o util.o variable.o version.o dmyext.o -lrt -ldl -lcrypt -lm -o libruby.so.1.8.7
compiling Win32API
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/Win32API'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/Win32API'
compiling bigdecimal
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/bigdecimal'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/bigdecimal'
compiling curses
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/curses'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/curses'
compiling dbm
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/dbm'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/dbm'
compiling digest
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/digest'
cp ../.././ext/digest/digest.h ../../.ext/i686-linux
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/digest'
compiling digest/bubblebabble
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/digest/bubblebabble'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/digest/bubblebabble'
compiling digest/md5
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/digest/md5'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/digest/md5'
compiling digest/rmd160
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/digest/rmd160'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/digest/rmd160'
compiling digest/sha1
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/digest/sha1'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/digest/sha1'
compiling digest/sha2
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/digest/sha2'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/digest/sha2'
compiling dl
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/dl'
cp dlconfig.h ../../.ext/i686-linux
cp ../.././ext/dl/dl.h ../../.ext/i686-linux
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/dl'
compiling etc
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/etc'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/etc'
compiling fcntl
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/fcntl'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/fcntl'
compiling gdbm
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/gdbm'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/gdbm'
compiling iconv
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/iconv'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/iconv'
compiling io/wait
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/io/wait'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/io/wait'
compiling nkf
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/nkf'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/nkf'
compiling openssl
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/openssl'
gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H=\"extconf.h\" -D_FILE_OFFSET_BITS=64 -fPIC -g -O2 -fPIC -c ossl_ssl.c
ossl_ssl.c:101:5: warning: initialization from incompatible pointer type [enabled by default]
ossl_ssl.c:101:5: warning: (near initialization for ‘ossl_ssl_method_tab[0].func’) [enabled by default]
ossl_ssl.c:102:5: warning: initialization from incompatible pointer type [enabled by default]
ossl_ssl.c:102:5: warning: (near initialization for ‘ossl_ssl_method_tab[1].func’) [enabled by default]
ossl_ssl.c:103:5: warning: initialization from incompatible pointer type [enabled by default]
ossl_ssl.c:103:5: warning: (near initialization for ‘ossl_ssl_method_tab[2].func’) [enabled by default]
ossl_ssl.c:104:5: warning: initialization from incompatible pointer type [enabled by default]
ossl_ssl.c:104:5: warning: (near initialization for ‘ossl_ssl_method_tab[3].func’) [enabled by default]
ossl_ssl.c:105:5: warning: initialization from incompatible pointer type [enabled by default]
ossl_ssl.c:105:5: warning: (near initialization for ‘ossl_ssl_method_tab[4].func’) [enabled by default]
ossl_ssl.c:106:5: warning: initialization from incompatible pointer type [enabled by default]
ossl_ssl.c:106:5: warning: (near initialization for ‘ossl_ssl_method_tab[5].func’) [enabled by default]
ossl_ssl.c:107:5: warning: initialization from incompatible pointer type [enabled by default]
ossl_ssl.c:107:5: warning: (near initialization for ‘ossl_ssl_method_tab[6].func’) [enabled by default]
ossl_ssl.c:108:5: warning: initialization from incompatible pointer type [enabled by default]
ossl_ssl.c:108:5: warning: (near initialization for ‘ossl_ssl_method_tab[7].func’) [enabled by default]
ossl_ssl.c:109:5: warning: initialization from incompatible pointer type [enabled by default]
ossl_ssl.c:109:5: warning: (near initialization for ‘ossl_ssl_method_tab[8].func’) [enabled by default]
ossl_ssl.c:110:5: warning: initialization from incompatible pointer type [enabled by default]
ossl_ssl.c:110:5: warning: (near initialization for ‘ossl_ssl_method_tab[9].func’) [enabled by default]
ossl_ssl.c:111:5: warning: initialization from incompatible pointer type [enabled by default]
ossl_ssl.c:111:5: warning: (near initialization for ‘ossl_ssl_method_tab[10].func’) [enabled by default]
ossl_ssl.c:112:5: warning: initialization from incompatible pointer type [enabled by default]
ossl_ssl.c:112:5: warning: (near initialization for ‘ossl_ssl_method_tab[11].func’) [enabled by default]
ossl_ssl.c: In function ‘ossl_sslctx_get_ciphers’:
ossl_ssl.c:626:19: error: ‘STACK’ undeclared (first use in this function)
ossl_ssl.c:626:19: note: each undeclared identifier is reported only once for each function it appears in
ossl_ssl.c:626:25: error: expected expression before ‘)’ token
ossl_ssl.c:629:47: error: expected expression before ‘)’ token
ossl_ssl.c:629:47: error: too few arguments to function ‘sk_value’
/usr/include/openssl/stack.h:80:7: note: declared here
ossl_ssl.c: In function ‘ossl_ssl_get_peer_cert_chain’:
ossl_ssl.c:1199:5: warning: passing argument 1 of ‘sk_num’ from incompatible pointer type [enabled by default]
/usr/include/openssl/stack.h:79:5: note: expected ‘const struct _STACK *’ but argument is of type ‘struct stack_st_X509 *’
ossl_ssl.c:1202:2: warning: passing argument 1 of ‘sk_value’ from incompatible pointer type [enabled by default]
/usr/include/openssl/stack.h:80:7: note: expected ‘const struct _STACK *’ but argument is of type ‘struct stack_st_X509 *’
ossl_ssl.c: In function ‘ossl_ssl_get_cipher’:
ossl_ssl.c:1224:12: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
make[1]: *** [ossl_ssl.o] Error 1
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p173/ext/openssl'
make: *** [all] Error 1
rvm install ruby-1.8.7-p173 fails with the following message
Installing Ruby from source to: /home/abu/.rvm/rubies/ruby-1.8.7-p173,
this may take a while depending on your cpu(s)... ruby-1.8.7-p173 -
#fetching ruby-1.8.7-p173 - #extracted to
/home/abu/.rvm/src/ruby-1.8.7-p173 (already extracted) ruby-1.8.7-p173
- #configuring ruby-1.8.7-p173 - #compiling ERROR: Error running
'make ', please read /home/abu/.rvm/log/ruby-1.8.7-p173/make.log
ERROR: There has been an error while running make. Halting the
installation.
MAKE LOG
2011-08-03 11:52:42] make
gcc -g -O2 -fPIC -DRUBY_EXPORT -D_GNU_SOURCE=1 -L. -rdynamic -Wl,-export-dynamic main.o libruby-static.a -lrt -ldl -lcrypt -lm -o miniruby
rbconfig.rb updated
gcc -shared -Wl,-soname,libruby.so.1.8 array.o bignum.o class.o compar.o dir.o dln.o enum.o enumerator.o error.o eval.o file.o gc.o hash.o inits.o io.o marshal.o math.o numeric.o object.o pack.o parse.o process.o prec.o random.o range.o re.o regex.o ruby.o signal.o sprintf.o st.o string.o struct.o time.o util.o variable.o version.o dmyext.o -lrt -ldl -lcrypt -lm -o libruby.so.1.8.7
compiling Win32API
compiling bigdecimal
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p352/ext/bigdecimal'
gcc -shared -o ../../.ext/i686-linux/bigdecimal.so bigdecimal.o -L. -L../.. -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/abu/.rvm/rubies/ruby-1.8.7-p352/lib -L/home/abu/.rvm/rubies/ruby-1.8.7-p352/lib -lruby -lrt -ldl -lcrypt -lm -lc
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p352/ext/bigdecimal'
compiling curses
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p352/ext/curses'
gcc -shared -o ../../.ext/i686-linux/curses.so curses.o -L. -L../.. -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/abu/.rvm/rubies/ruby-1.8.7-p352/lib -L/home/abu/.rvm/rubies/ruby-1.8.7-p352/lib -lruby -lncurses -ltinfo -lrt -ldl -lcrypt -lm -lc
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p352/ext/curses'
compiling dbm
compiling digest
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p352/ext/digest'
gcc -shared -o ../../.ext/i686-linux/digest.so digest.o -L. -L../.. -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/abu/.rvm/rubies/ruby-1.8.7-p352/lib -L/home/abu/.rvm/rubies/ruby-1.8.7-p352/lib -lruby -lrt -ldl -lcrypt -lm -lc
cp ../.././ext/digest/digest.h ../../.ext/i686-linux
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p352/ext/digest'
compiling digest/bubblebabble
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p352/ext/digest/bubblebabble'
gcc -shared -o ../../../.ext/i686-linux/digest/bubblebabble.so bubblebabble.o -L. -L../../.. -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/abu/.rvm/rubies/ruby-1.8.7-p352/lib -L/home/abu/.rvm/rubies/ruby-1.8.7-p352/lib -lruby -lrt -ldl -lcrypt -lm -lc
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p352/ext/digest/bubblebabble'
compiling digest/md5
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p352/ext/digest/md5'
gcc -shared -o ../../../.ext/i686-linux/digest/md5.so md5init.o md5ossl.o -L. -L../../.. -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/abu/.rvm/rubies/ruby-1.8.7-p352/lib -L/home/abu/.rvm/rubies/ruby-1.8.7-p352/lib -lruby -lcrypto -lrt -ldl -lcrypt -lm -lc
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p352/ext/digest/md5'
compiling digest/rmd160
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p352/ext/digest/rmd160'
gcc -shared -o ../../../.ext/i686-linux/digest/rmd160.so rmd160init.o rmd160ossl.o -L. -L../../.. -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/abu/.rvm/rubies/ruby-1.8.7-p352/lib -L/home/abu/.rvm/rubies/ruby-1.8.7-p352/lib -lruby -lcrypto -lrt -ldl -lcrypt -lm -lc
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p352/ext/digest/rmd160'
compiling digest/sha1
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p352/ext/digest/sha1'
gcc -shared -o ../../../.ext/i686-linux/digest/sha1.so sha1init.o sha1ossl.o -L. -L../../.. -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/abu/.rvm/rubies/ruby-1.8.7-p352/lib -L/home/abu/.rvm/rubies/ruby-1.8.7-p352/lib -lruby -lcrypto -lrt -ldl -lcrypt -lm -lc
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p352/ext/digest/sha1'
compiling digest/sha2
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p352/ext/digest/sha2'
gcc -shared -o ../../../.ext/i686-linux/digest/sha2.so sha2.o sha2init.o -L. -L../../.. -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/abu/.rvm/rubies/ruby-1.8.7-p352/lib -L/home/abu/.rvm/rubies/ruby-1.8.7-p352/lib -lruby -lrt -ldl -lcrypt -lm -lc
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p352/ext/digest/sha2'
compiling dl
make[1]: Entering directory `/home/abu/.rvm/src/ruby-1.8.7-p352/ext/dl'
gcc -I. -I../.. -I../../. -I../.././ext/dl -DHAVE_DLFCN_H -DHAVE_DLOPEN -DHAVE_DLCLOSE -DHAVE_DLSYM -DHAVE_DLERROR -D_FILE_OFFSET_BITS=64 -I. -fPIC -g -O2 -fPIC -fno-defer-pop -fno-omit-frame-pointer -c dl.c
In file included from dl.c:104:0:
callback.func:1:1: warning: data definition has no type or storage class [enabled by default]
callback.func:1:7: error: expected identifier or ‘(’ before ‘long’
In file included from dl.c:104:0:
callback.func:78:33: error: expected ‘)’ before ‘(’ token
callback.func:79:3: warning: data definition has no type or storage class [enabled by default]
callback.func:79:24: error: ‘proc’ undeclared here (not in a function)
callback.func:79:39: error: ‘argc’ undeclared here (not in a function)
callback.func:79:45: error: ‘argv’ undeclared here (not in a function)
callback.func:82:1: error: expected identifier or ‘(’ before ‘}’ token
dl.c:106:1: error: expected ‘;’, ‘,’ or ‘)’ before ‘static’
make[1]: *** [dl.o] Error 1
make[1]: Leaving directory `/home/abu/.rvm/src/ruby-1.8.7-p352/ext/dl'
make: *** [all] Error 1
RVM INFO
ruby-1.8.7-p352#rails3:
system:
uname: "Linux Beelzebub 2.6.38.8-32.fc15.i686 #1 SMP Mon Jun 13 20:01:50 UTC 2011 i686 i686 i386 GNU/Linux"
bash: "/bin/bash => GNU bash, version 4.2.10(1)-release (i386-redhat-linux-gnu)"
zsh: " => not installed"
rvm:
version: "rvm 1.6.21 by Wayne E. Seguin (wayneeseguin#gmail.com) [https://rvm.beginrescueend.com/]"
ruby:
interpreter: "ruby"
version: "1.9.2p180"
date: "2011-02-18"
platform: "i686-linux"
patchlevel: "2011-02-18 revision 30909"
full_version: "ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]"
homes:
gem: "/home/abu/.rvm/gems/ruby-1.8.7-p352#rails3"
ruby: "not set"
binaries:
ruby: "/home/abu/.rvm/bin/ruby"
irb: "/home/abu/.rvm/bin/irb"
gem: "/home/abu/.rvm/bin/gem"
rake: "/home/abu/.rvm/bin/rake"
environment:
PATH: "/home/abu/.rvm/bin:/home/abu/.rvm/gems/ruby-1.9.2-p180/bin:/home/abu/.rvm/gems/ruby-1.9.2-p180#global/bin:/home/abu/.rvm/rubies/ruby-1.9.2-p180/bin:/home/abu/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
GEM_HOME: "/home/abu/.rvm/gems/ruby-1.8.7-p352#rails3"
GEM_PATH: "/home/abu/.rvm/gems/ruby-1.8.7-p352#rails3:"
MY_RUBY_HOME: ""
IRBRC: ""
RUBYOPT: ""
gemset: "rails3"
thanksmate, janxie
The patch works !!
what caused the problem ??
openssl incompatibility issue...if interested google for more:P
Solution:
If anybody confused like me... "Cheese, I am rvm guy, how do I patch... "make" and "(sudo) make install".. so my rvm understands the end result"... Nevermind, I got the work arounds :D
How ??
+ rvm install ruby-1.8.7-p249 --patch path/to/downloaded.patch
But....if still no luck... same crappy ossl-error.. damn
+ do inject patch on fly of Mr.old ruby-ve.rs.i-on installation...
Demo: while intalling ruby like this...
→ rvm install ruby-1.8.7-p249
it starts downloading source... start to configure... Meanwhile fire up new terminal and inject the patch then like:(considering systemwide installation)
→ cd /usr/local/rvm/src/ruby-1.8.7-p249;patch -p0 < 'path/to/openssl.patch'
Mine worked :D, hope yours do to.. Good luck हे हे
So not to familiar with installing extensions by here is my process and the moment of fail.
$ sudo pecl install uuid
then all is good until...
creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/var/tmp/pear-build-root/uuid-1.0.2/libtool --mode=compile cc -I. -I/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid -DPHP_ATOM_INC -I/private/var/tmp/pear-build-root/uuid-1.0.2/include -I/private/var/tmp/pear-build-root/uuid-1.0.2/main -I/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/include -DHAVE_CONFIG_H -g -O2 -c /private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c -o uuid.lo
mkdir .libs
cc -I. "-I/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid" -DPHP_ATOM_INC -I/private/var/tmp/pear-build-root/uuid-1.0.2/include -I/private/var/tmp/pear-build-root/uuid-1.0.2/main "-I/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid" -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/include -DHAVE_CONFIG_H -g -O2 -c "/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c" -fno-common -DPIC -o .libs/uuid.o
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c: In function ‘zm_startup_uuid’:
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:89: error: ‘UUID_TYPE_DCE_TIME’ undeclared (first use in this function)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:89: error: (Each undeclared identifier is reported only once
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:89: error: for each function it appears in.)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:90: error: ‘UUID_TYPE_DCE_RANDOM’ undeclared (first use in this function)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c: In function ‘zif_uuid_create’:
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:168: error: ‘UUID_TYPE_DCE_TIME’ undeclared (first use in this function)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:171: error: ‘UUID_TYPE_DCE_RANDOM’ undeclared (first use in this function)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:181: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long int’
make: *** [uuid.lo] Error 1
ERROR: `make' failed
Follow this tutorial --
http://unrealexpectations.com/blog/2010/04/mamp-pecluuid-module-working-on-snow-leopard/
When you go to make the patch make sure the file to patch are entered correctly, you want to have it be tests/uuid_mac.phpt
If that doesn't work make sure you have you have your php.ini configured with the extension_dir and have the extension=uuid.so there as well.
This also works for OS X 10.7
You will need an updated version of uuid from util-linux. It is available on Homebrew.
brew install util-linux
But util-linux is a keg-only package and will not be symlinked to /usr/local. Hence you will have to specify the following path when prompted for uuid installation directory
/usr/local/opt/util-linux
For unattended installations, you can use
printf "/usr/local/opt/util-linux" | pecl install uuid