Forums: 

Hi,

I just downloaded the SDK and I'm not being able to make the samples provided with it.

I have dev tools installed in my mac and I've been able to compile other things before. I also have homebrew.

 

This is my version of GCC.

 

☁  musicid_file_trackid  gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/4.7.2/gcc/libexec/gcc/x86_64-apple-darwin12.2.1/4.7.2/lto-wrapper
Target: x86_64-apple-darwin12.2.1
Configured with: ../configure --enable-languages=c,c++,objc,obj-c++ --prefix=/usr/local/Cellar/gcc/4.7.2/gcc --datarootdir=/usr/local/Cellar/gcc/4.7.2/share --bindir=/usr/local/Cellar/gcc/4.7.2/bin --program-suffix=-4.7 --with-gmp=/usr/local/Cellar/gmp/5.0.5 --with-mpfr=/usr/local/Cellar/mpfr/3.1.1-p2 --with-mpc=/usr/local/Cellar/libmpc/1.0.1 --with-system-zlib --enable-stage1-checking --enable-plugin --enable-lto --enable-multilib
Thread model: posix
gcc version 4.7.2 (GCC)

 

Here's what make throws:

 

☁  musicid_file_trackid  make
Gathering sources for 'mac_x86-64' build...
Gathering libraries for 'mac_x86-64' build...
GNSDK Headers...
Local Headers...
if [ -d _output/mac_x86-64/debug ]; then rm -f -r _output/mac_x86-64/debug; fi
mkdir -p _output/mac_x86-64/debug/
 
***********************************************
PLATFORM : mac_x86-64
TARGET   : ./sample
SOURCES  : main.c
DEPENDS  :
 
gcc  -g -arch i386 -m64 -mmacosx-version-min=10.5  -fPIC -funsigned-char -Wall -pedantic -Wextra -Wno-long-long -Wno-variadic-macros -Wno-missing-field-initializers -Wpointer-arith -D_DEBUG    -D_THREAD_SAFE -D_REENTRANT -DGCSL_STRICT_HANDLES -DGNSDK_STRICT_HANDLES -I_include -Imac -I../../builds/../include -I../../builds/../include/mac_x86-64 -I/mac -c main.c -o _output/mac_x86-64/debug/main.o
main.c: In function ‘_display_error’:
main.c:160:16: warning: unused parameter ‘error_code’ [-Wunused-parameter]
main.c: In function ‘_shutdown_gnsdk’:
main.c:548:9: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:7:bad register name `%rbp'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:9:bad register name `%rsp'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:11:bad register name `%rsp'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:12:bad register name `%rdi'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:13:bad register name `%rsi'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:15:bad register name `%rdx'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:16:bad register name `%rbp)'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:17:bad register name `%rbp)'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:18:bad register name `%rcx'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:20:bad register name `%rax'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:33:bad register name `%rbp'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:35:bad register name `%rsp'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:37:bad register name `%rsp'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:38:bad register name `%rdi'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:39:bad register name `%rsi'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:41:bad register name `%rdx'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:42:bad register name `%rbp)'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:43:bad register name `%rbp)'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:44:bad register name `%rcx'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:46:bad register name `%rax'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:73:bad register name `%rbp'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:75:bad register name `%rsp'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:77:bad register name `%rsp'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:78:bad register name `%rbp)'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:79:bad register name `%rsi'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:81:bad register name `%rbp)'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:84:bad register name `%rbp)'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:87:bad register name `%rbp)'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:90:`LC0(%rip)' is not a valid base/index expression
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:91:bad register name `%rax'
/var/folders/rh/0bcl0zb56b9fwbzr1tf73gk80000gn/T//ccvIkHoB.s:94:bad register name `%rbp)'
(lines like that repeat for a long while until)
make: *** [_output/mac_x86-64/debug/main.o] Error 1
☁  musicid_file_trackid  

Hello,Looks like you have 32bit binutils where as gcc is trying to do a 64bit build. Make sure your binutils & gcc has the same configuration.By default the GNSDK makefiles will build using the 64-bit libraries on Mac OS X. You can force a 32-bit build by typing:

make ARCH=i386

Forum Discussions