Jacobi-update: Crash when using Tango.getCameraIntrinsics - google-project-tango

Before the Jacobi update I was getting the camera intrinsics this way with no issue:
TangoCameraIntrinsics t = mTango.getCameraIntrinsics(1);
After the Jacobi update I try to get the camera intrinsics by calling the same function this way:
TangoCameraIntrinsics t = mTango.getCameraIntrinsics(TangoCameraIntrinsics.TANGO_CAMERA_COLOR);
calling the function in the Jacobi release now generates this crash while running the app:
A/art﹕ art/runtime/check_jni.cc:64] JNI DETECTED ERROR IN APPLICATION: native code passing in reference to invalid stack indirect reference table or invalid reference: 0x649259b8
A/art﹕ art/runtime/check_jni.cc:64] in call to DeleteLocalRef
A/art﹕ art/runtime/check_jni.cc:64] from int com.google.atap.tango.TangoJNINative.GetCameraIntrinsics(int, com.google.atap.tangoservice.TangoCameraIntrinsics)
A/art﹕ art/runtime/check_jni.cc:64] "main" prio=5 tid=1 Runnable
A/art﹕ art/runtime/check_jni.cc:64] | group="main" sCount=0 dsCount=0 obj=0x646d0b70 self=0x41756ea8
A/art﹕ art/runtime/check_jni.cc:64] | sysTid=7203 nice=0 cgrp=apps sched=0/0 handle=0x400a9154
A/art﹕ art/runtime/check_jni.cc:64] | state=R schedstat=( 1271432728 1183033922 4621 ) utm=85 stm=41 core=1 HZ=100
A/art﹕ art/runtime/check_jni.cc:64] | stack=0xbe325000-0xbe329000 stackSize=8MB
A/art﹕ art/runtime/check_jni.cc:64] native: art::Thread::DumpStack(std::ostream&) const+87 [0x416a4b78] (libart.so)
A/art﹕ art/runtime/check_jni.cc:64] native: ??? [0x415508a6] (libart.so)
A/art﹕ art/runtime/check_jni.cc:64] native: art::JniAbortF(char const*, char const*, ...)+51 [0x41551254] (libart.so)
A/art﹕ art/runtime/check_jni.cc:64] native: ??? [0x41553980] (libart.so)
A/art﹕ art/runtime/check_jni.cc:64] native: ??? [0x41554806] (libart.so)
A/art﹕ art/runtime/check_jni.cc:64] native: ??? [0x41555d3a] (libart.so)
A/art﹕ art/runtime/check_jni.cc:64] native: Java_com_google_atap_tango_TangoJNINative_GetCameraIntrinsics+475 [0x4ad6e36c] (libtango_client_api.so)
A/art﹕ art/runtime/check_jni.cc:64] at com.google.atap.tango.TangoJNINative.GetCameraIntrinsics(Native method)
A/art﹕ art/runtime/check_jni.cc:64] at com.google.atap.tangoservice.Tango.getCameraIntrinsics(Tango.java:318)
Any ideas on how to fix this problem?

Related

Quantum Espresso v6.8 not compiling on MacBook (Monterey 12.0.1 (21A559))

Following a guide posted here I have tried to install the newest version of quantum espresso (v6.8) on my MacBook (macOS: Monterey 12.0.1 (21A559)). I therefore installed all prerequisite packages (gcc, fftw, lapack, openblas, open-mpi, eigen) using Homebrew.
Following the guide I used ./configure and got:
The following libraries have been found:
BLAS_LIBS= -lblas
LAPACK_LIBS=-L/usr/local/lib -llapack -lblas
FFT_LIBS=-L/usr/local/lib -lfftw3
Please check if this is what you expect.
If any libraries are missing, you may specify a list of directories
to search and retry, as follows:
./configure LIBDIRS="list of directories, separated by spaces"
Parallel environment detected successfully.\
Configured for compilation of parallel executables.
For more info, read the ESPRESSO User's Guide (Doc/users-guide.tex).
--------------------------------------------------------------------
configure: success
Afterwards I used the make all and afterwards the make install commands to initialize the quantum espresso installation but I get the following errors:
gfortran -O3 -g -fallow-argument-mismatch -cpp -I./ -I/Users/franz/Desktop/qe-6.8/external/devxlib//include -I../include/ -c device_auxfunc_mod.f90
gfortran -O3 -g -fallow-argument-mismatch -cpp -I./ -I/Users/franz/Desktop/qe-6.8/external/devxlib//include -I../include/ -c device_fbuff.f90
gfortran -O3 -g -fallow-argument-mismatch -cpp -I./ -I/Users/franz/Desktop/qe-6.8/external/devxlib//include -I../include/ -c device_fbuff_mod.f90
gfortran -O3 -g -fallow-argument-mismatch -cpp -I./ -I/Users/franz/Desktop/qe-6.8/external/devxlib//include -I../include/ -c device_defs_mod.f90
gfortran -O3 -g -fallow-argument-mismatch -cpp -I./ -I/Users/franz/Desktop/qe-6.8/external/devxlib//include -I../include/ -c device_linalg_mod.f90
gfortran -O3 -g -fallow-argument-mismatch -cpp -I./ -I/Users/franz/Desktop/qe-6.8/external/devxlib//include -I../include/ -c device_memcpy_mod.f90
gfortran -O3 -g -fallow-argument-mismatch -cpp -I./ -I/Users/franz/Desktop/qe-6.8/external/devxlib//include -I../include/ -c devxlib_mod.f90
gfortran -O3 -g -fallow-argument-mismatch -cpp -I./ -I/Users/franz/Desktop/qe-6.8/external/devxlib//include -I../include/ -c device_memcpy_base.f90
gfortran -O3 -g -fallow-argument-mismatch -cpp -I./ -I/Users/franz/Desktop/qe-6.8/external/devxlib//include -I../include/ -c device_memcpy_async.f90
gfortran -O3 -g -fallow-argument-mismatch -cpp -I./ -I/Users/franz/Desktop/qe-6.8/external/devxlib//include -I../include/ -c device_malloc.f90
gfortran -O3 -g -fallow-argument-mismatch -cpp -I./ -I/Users/franz/Desktop/qe-6.8/external/devxlib//include -I../include/ -c device_auxfunc.f90
gfortran -O3 -g -fallow-argument-mismatch -cpp -I./ -I/Users/franz/Desktop/qe-6.8/external/devxlib//include -I../include/ -c device_linalg.f90
cc -O3 -I./ -I/Users/franz/Desktop/qe-6.8/external/devxlib//include -I../include/ -c timer.c
gfortran -O3 -g -fallow-argument-mismatch -cpp -I./ -I/Users/franz/Desktop/qe-6.8/external/devxlib//include -I../include/ -c timer_mod.f90
ar ruv libdevXlib.a devxlib_mod.o device_defs_mod.o device_memcpy_base.o device_memcpy_async.o device_malloc.o device_memcpy_mod.o device_auxfunc.o device_auxfunc_mod.o device_fbuff.o device_fbuff_mod.o device_linalg.o device_linalg_mod.o timer.o timer_mod.o
ar: creating archive libdevXlib.a
a - devxlib_mod.o
a - device_defs_mod.o
a - device_memcpy_base.o
a - device_memcpy_async.o
a - device_malloc.o
a - device_memcpy_mod.o
a - device_auxfunc.o
a - device_auxfunc_mod.o
a - device_fbuff.o
a - device_fbuff_mod.o
a - device_linalg.o
a - device_linalg_mod.o
a - timer.o
a - timer_mod.o
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libdevXlib.a(devxlib_mod.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libdevXlib.a(device_defs_mod.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libdevXlib.a(device_memcpy_mod.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libdevXlib.a(device_auxfunc_mod.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libdevXlib.a(timer_mod.o) has no symbols
ranlib -c libdevXlib.a
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libdevXlib.a(devxlib_mod.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libdevXlib.a(device_defs_mod.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libdevXlib.a(device_memcpy_mod.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libdevXlib.a(device_auxfunc_mod.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libdevXlib.a(timer_mod.o) has no symbols
if test -d extlibs ; then \
( cd extlibs ; make ) ; fi
make[3]: Nothing to be done for `all'.
if test -d src/ ; then \
( cd src/ ; make test ) ; fi
gfortran -O3 -g -fallow-argument-mismatch -cpp -I./ -I/Users/franz/Desktop/qe-6.8/external/devxlib//include -I../include/ -c test_memcpy.f90
gfortran -g -o test_memcpy.x test_memcpy.o \
devxlib_mod.o device_defs_mod.o device_memcpy_base.o device_memcpy_async.o device_malloc.o device_memcpy_mod.o device_auxfunc.o device_auxfunc_mod.o device_fbuff.o device_fbuff_mod.o device_linalg.o device_linalg_mod.o timer.o timer_mod.o -lblas
( cd ../bin ; ln -sf ../src/test_memcpy.x . )
gfortran -O3 -g -fallow-argument-mismatch -cpp -I./ -I/Users/franz/Desktop/qe-6.8/external/devxlib//include -I../include/ -c test_memcpy_async.f90
test_memcpy_async.f90:405:67:
405 | call dev_memcpy_h2d_async(A_dev1__sp_r1d, A_hst1__sp_r1d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:408:67:
408 | call dev_memcpy_d2d_async(A_dev2__sp_r1d, A_dev1__sp_r1d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:412:66:
412 | call dev_memcpy_d2h_async(A_hst2__sp_r1d, A_dev2__sp_r1d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:505:67:
505 | call dev_memcpy_h2d_async(A_dev1__sp_r2d, A_hst1__sp_r2d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:508:67:
508 | call dev_memcpy_d2d_async(A_dev2__sp_r2d, A_dev1__sp_r2d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:512:66:
512 | call dev_memcpy_d2h_async(A_hst2__sp_r2d, A_dev2__sp_r2d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:605:67:
605 | call dev_memcpy_h2d_async(A_dev1__sp_r3d, A_hst1__sp_r3d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:608:67:
608 | call dev_memcpy_d2d_async(A_dev2__sp_r3d, A_dev1__sp_r3d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:612:66:
612 | call dev_memcpy_d2h_async(A_hst2__sp_r3d, A_dev2__sp_r3d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:705:67:
705 | call dev_memcpy_h2d_async(A_dev1__sp_r4d, A_hst1__sp_r4d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:708:67:
708 | call dev_memcpy_d2d_async(A_dev2__sp_r4d, A_dev1__sp_r4d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:712:66:
712 | call dev_memcpy_d2h_async(A_hst2__sp_r4d, A_dev2__sp_r4d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:806:67:
806 | call dev_memcpy_h2d_async(A_dev1__dp_r1d, A_hst1__dp_r1d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:809:67:
809 | call dev_memcpy_d2d_async(A_dev2__dp_r1d, A_dev1__dp_r1d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:813:66:
813 | call dev_memcpy_d2h_async(A_hst2__dp_r1d, A_dev2__dp_r1d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:906:67:
906 | call dev_memcpy_h2d_async(A_dev1__dp_r2d, A_hst1__dp_r2d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:909:67:
909 | call dev_memcpy_d2d_async(A_dev2__dp_r2d, A_dev1__dp_r2d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:913:66:
913 | call dev_memcpy_d2h_async(A_hst2__dp_r2d, A_dev2__dp_r2d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:1006:67:
1006 | call dev_memcpy_h2d_async(A_dev1__dp_r3d, A_hst1__dp_r3d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:1009:67:
1009 | call dev_memcpy_d2d_async(A_dev2__dp_r3d, A_dev1__dp_r3d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:1013:66:
1013 | call dev_memcpy_d2h_async(A_hst2__dp_r3d, A_dev2__dp_r3d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:1106:67:
1106 | call dev_memcpy_h2d_async(A_dev1__dp_r4d, A_hst1__dp_r4d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:1109:67:
1109 | call dev_memcpy_d2d_async(A_dev2__dp_r4d, A_dev1__dp_r4d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:1113:66:
1113 | call dev_memcpy_d2h_async(A_hst2__dp_r4d, A_dev2__dp_r4d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:1212:67:
1212 | call dev_memcpy_h2d_async(A_dev1__sp_c1d, A_hst1__sp_c1d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:1215:67:
1215 | call dev_memcpy_d2d_async(A_dev2__sp_c1d, A_dev1__sp_c1d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:1222:66:
1222 | call dev_memcpy_d2h_async(A_hst2__sp_c1d, A_dev2__sp_c1d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:1322:67:
1322 | call dev_memcpy_h2d_async(A_dev1__sp_c2d, A_hst1__sp_c2d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:1325:67:
1325 | call dev_memcpy_d2d_async(A_dev2__sp_c2d, A_dev1__sp_c2d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:1332:66:
1332 | call dev_memcpy_d2h_async(A_hst2__sp_c2d, A_dev2__sp_c2d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:1432:67:
1432 | call dev_memcpy_h2d_async(A_dev1__sp_c3d, A_hst1__sp_c3d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:1435:67:
1435 | call dev_memcpy_d2d_async(A_dev2__sp_c3d, A_dev1__sp_c3d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:1442:66:
1442 | call dev_memcpy_d2h_async(A_hst2__sp_c3d, A_dev2__sp_c3d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:1542:67:
1542 | call dev_memcpy_h2d_async(A_dev1__sp_c4d, A_hst1__sp_c4d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:1545:67:
1545 | call dev_memcpy_d2d_async(A_dev2__sp_c4d, A_dev1__sp_c4d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:1552:66:
1552 | call dev_memcpy_d2h_async(A_hst2__sp_c4d, A_dev2__sp_c4d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:1653:67:
1653 | call dev_memcpy_h2d_async(A_dev1__dp_c1d, A_hst1__dp_c1d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:1656:67:
1656 | call dev_memcpy_d2d_async(A_dev2__dp_c1d, A_dev1__dp_c1d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:1663:66:
1663 | call dev_memcpy_d2h_async(A_hst2__dp_c1d, A_dev2__dp_c1d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:1763:67:
1763 | call dev_memcpy_h2d_async(A_dev1__dp_c2d, A_hst1__dp_c2d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:1766:67:
1766 | call dev_memcpy_d2d_async(A_dev2__dp_c2d, A_dev1__dp_c2d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:1773:66:
1773 | call dev_memcpy_d2h_async(A_hst2__dp_c2d, A_dev2__dp_c2d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:1873:67:
1873 | call dev_memcpy_h2d_async(A_dev1__dp_c3d, A_hst1__dp_c3d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:1876:67:
1876 | call dev_memcpy_d2d_async(A_dev2__dp_c3d, A_dev1__dp_c3d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:1883:66:
1883 | call dev_memcpy_d2h_async(A_hst2__dp_c3d, A_dev2__dp_c3d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:1983:67:
1983 | call dev_memcpy_h2d_async(A_dev1__dp_c4d, A_hst1__dp_c4d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:1986:67:
1986 | call dev_memcpy_d2d_async(A_dev2__dp_c4d, A_dev1__dp_c4d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:1993:66:
1993 | call dev_memcpy_d2h_async(A_hst2__dp_c4d, A_dev2__dp_c4d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:2093:67:
2093 | call dev_memcpy_h2d_async(A_dev1__i4_i1d, A_hst1__i4_i1d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:2096:67:
2096 | call dev_memcpy_d2d_async(A_dev2__i4_i1d, A_dev1__i4_i1d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:2100:66:
2100 | call dev_memcpy_d2h_async(A_hst2__i4_i1d, A_dev2__i4_i1d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:2195:67:
2195 | call dev_memcpy_h2d_async(A_dev1__i4_i2d, A_hst1__i4_i2d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:2198:67:
2198 | call dev_memcpy_d2d_async(A_dev2__i4_i2d, A_dev1__i4_i2d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:2202:66:
2202 | call dev_memcpy_d2h_async(A_hst2__i4_i2d, A_dev2__i4_i2d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:2297:67:
2297 | call dev_memcpy_h2d_async(A_dev1__i4_i3d, A_hst1__i4_i3d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:2300:67:
2300 | call dev_memcpy_d2d_async(A_dev2__i4_i3d, A_dev1__i4_i3d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:2304:66:
2304 | call dev_memcpy_d2h_async(A_hst2__i4_i3d, A_dev2__i4_i3d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:2399:67:
2399 | call dev_memcpy_h2d_async(A_dev1__i4_i4d, A_hst1__i4_i4d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:2402:67:
2402 | call dev_memcpy_d2d_async(A_dev2__i4_i4d, A_dev1__i4_i4d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:2406:66:
2406 | call dev_memcpy_d2h_async(A_hst2__i4_i4d, A_dev2__i4_i4d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:2504:67:
2504 | call dev_memcpy_h2d_async(A_dev1__l4_l1d, A_hst1__l4_l1d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:2507:67:
2507 | call dev_memcpy_d2d_async(A_dev2__l4_l1d, A_dev1__l4_l1d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:2511:66:
2511 | call dev_memcpy_d2h_async(A_hst2__l4_l1d, A_dev2__l4_l1d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:2607:67:
2607 | call dev_memcpy_h2d_async(A_dev1__l4_l2d, A_hst1__l4_l2d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:2610:67:
2610 | call dev_memcpy_d2d_async(A_dev2__l4_l2d, A_dev1__l4_l2d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:2614:66:
2614 | call dev_memcpy_d2h_async(A_hst2__l4_l2d, A_dev2__l4_l2d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:2710:67:
2710 | call dev_memcpy_h2d_async(A_dev1__l4_l3d, A_hst1__l4_l3d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:2713:67:
2713 | call dev_memcpy_d2d_async(A_dev2__l4_l3d, A_dev1__l4_l3d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:2717:66:
2717 | call dev_memcpy_d2h_async(A_hst2__l4_l3d, A_dev2__l4_l3d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
test_memcpy_async.f90:2813:67:
2813 | call dev_memcpy_h2d_async(A_dev1__l4_l4d, A_hst1__l4_l4d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_h2d_async' at (1)
test_memcpy_async.f90:2816:67:
2816 | call dev_memcpy_d2d_async(A_dev2__l4_l4d, A_dev1__l4_l4d, stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2d_async' at (1)
test_memcpy_async.f90:2820:66:
2820 | call dev_memcpy_d2h_async(A_hst2__l4_l4d, A_dev2__l4_l4d,stream)
| 1
Error: There is no specific subroutine for the generic 'dev_memcpy_d2h_async' at (1)
make[3]: *** [test_memcpy_async.o] Error 1
make[2]: *** [tests] Error 2
make[1]: *** [libcuda_devxlib] Error 2
make: *** [libcuda] Error 2
I think this has to do with the LAPACK_LIBS but I am not sure and I don't know how to solve this issue. Any help is highly appreciated and please also tell me, if you need further information. Thanks in advance!
I was having a similar issue, but not for Macbook since I was compiling the gpu version of q-e. I had the same error which stated the instructions for a generic subroutine was not found.
This turned out to be a problem with cmake, surprisingly. Which version of cmake are you using? You can find this out by typing in the terminal: cmake --version
According to the documentation, version 3.14 or greater is necessary.

Linker error using gcc and clang together on macos sierra

I have to compile c++ code with g++ 6.4.0 (Homebrew g++-6) to a static lib, which is then wrapped into a C static lib (Homebrew gcc-6) and linked to a clang++ (clang 8.1.0) app on macos sierra. So the picture is:
c++ (gcc) wrapped in c (gcc) linked to clang app.
As a testcase I use shared-lib.cpp:
#include <iostream>
using namespace std;
void foo()
{
cerr << "Hi from the shared lib" << endl;
}
together with shared-lib.h
extern void foo();
and wrapper-lib.c
#include "shared-lib.h"
int wrapper()
{
foo();
return 123;
}
along with wrapper-lib.h
#ifdef __cplusplus
extern "C"
{
#endif
extern int wrapper();
#ifdef __cplusplus
}
#endif
The main.cpp that uses all the libs looks like
#include <iostream>
#include <string>
#include "shared-lib.h"
#include "wrapper-lib.h"
using namespace std;
int main()
{
auto s = "Hello world from main";
cout << s << endl;
foo(); // from c++ lib
int result = wrapper(); // from c wrapper lib
cout << "wrapper returned " << result << endl;
return 0;
}
My test built script is
g++-6 --version
echo -----------------------
echo build shared-lib .o with g++
g++-6 -c -Wall -fpic -std=c++11 shared-lib.cpp
echo build a wrapper library in C with gcc
gcc-6 -c -Wall -fpic wrapper-lib.c
echo build static libshared-lib.a
ar rcs libshared-lib.a shared-lib.o
echo build static libwrapper-lib.a
ar rcs libwrapper-lib.a wrapper-lib.o
echo build main with clang
clang++ --version
echo ----------------------
clang++ -v -L/Users/worker -Wall -std=c++11 -stdlib=libstdc++ -lwrapper-lib -lshared-lib main.cpp -o main
echo start the app
./main
If I only call the gcc c++ function foo() then everything works fine.
If I call the C wrapper function wrapper(), then clang comes up with:
Undefined symbols for architecture x86_64:
"_foo", referenced from:
_wrapper in libwrapper-lib.a(wrapper-lib.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Maybe someone can simply spot, what's wrong with my workflow?
Note, for completeness the whole build script output
Note2, since ar in the gcc#6 toolchain does not work (liblto_plugin.so missing) I use clang's ar tool...
mac-mini:~ worker$ ./build-test.sh
g++-6 (Homebrew GCC 6.4.0) 6.4.0
Copyright (C) 2017 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.
-----------------------
build shared-lib .o with g++
build a wrapper library in C with gcc
build static libshared-lib.a
build static libwrapper-lib.a
build main with clang
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.41)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
----------------------
Apple LLVM version 8.1.0 (clang-802.0.41)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: warning: libstdc++ is deprecated; move to libc++ [-Wdeprecated]
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.12.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name main.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu penryn -target-linker-version 278.4 -v -dwarf-column-info -debugger-tuning=lldb -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0 -stdlib=libstdc++ -Wall -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/worker -ferror-limit 19 -fmessage-length 166 -stack-protector 1 -fblocks -fobjc-runtime=macosx-10.12.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -o /var/folders/18/m18t0kxx03d7__31kg3wrsr40000gq/T/main-337db7.o -x c++ main.cpp
clang -cc1 version 8.1.0 (clang-802.0.41) default target x86_64-apple-darwin16.7.0
ignoring nonexistent directory "/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64"
ignoring nonexistent directory "/usr/include/c++/4.0.0"
ignoring nonexistent directory "/usr/include/c++/4.0.0/i686-apple-darwin8/"
ignoring nonexistent directory "/usr/include/c++/4.0.0/backward"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/4.2.1
/usr/include/c++/4.2.1/backward
/usr/local/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
/usr/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -no_deduplicate -dynamic -arch x86_64 -macosx_version_min 10.12.0 -o main -L/Users/worker -lwrapper-lib -lshared-lib /var/folders/18/m18t0kxx03d7__31kg3wrsr40000gq/T/main-337db7.o -lstdc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
Undefined symbols for architecture x86_64:
"_foo", referenced from:
_wrapper in libwrapper-lib.a(wrapper-lib.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
You compile shared-lib.cpp with:
g++-6 -c -Wall -fpic -std=c++11 shared-lib.cpp
And you compile wrapper-lib.c with:
gcc-6 -c -Wall -fpic wrapper-lib.c
Have a look at the symbol table of shared-lib.o. It's something like:
$ readelf -s shared-lib.o
Symbol table '.symtab' contains 24 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 FILE LOCAL DEFAULT ABS shared-lib.cpp
2: 0000000000000000 0 SECTION LOCAL DEFAULT 1
3: 0000000000000000 0 SECTION LOCAL DEFAULT 3
4: 0000000000000000 0 SECTION LOCAL DEFAULT 4
5: 0000000000000000 0 SECTION LOCAL DEFAULT 5
6: 0000000000000000 1 OBJECT LOCAL DEFAULT 5 _ZStL19piecewise_construc
7: 0000000000000000 1 OBJECT LOCAL DEFAULT 4 _ZStL8__ioinit
8: 0000000000000032 73 FUNC LOCAL DEFAULT 1 _Z41__static_initializati
9: 000000000000007b 21 FUNC LOCAL DEFAULT 1 _GLOBAL__sub_I_shared_lib
10: 0000000000000000 0 SECTION LOCAL DEFAULT 6
11: 0000000000000000 0 SECTION LOCAL DEFAULT 9
12: 0000000000000000 0 SECTION LOCAL DEFAULT 10
13: 0000000000000000 0 SECTION LOCAL DEFAULT 8
14: 0000000000000000 50 FUNC GLOBAL DEFAULT 1 _Z3foov
15: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _GLOBAL_OFFSET_TABLE_
16: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _ZSt4cerr
17: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _ZStlsISt11char_traitsIcE
18: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _ZSt4endlIcSt11char_trait
19: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _ZNSolsEPFRSoS_E
20: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _ZNSt8ios_base4InitC1Ev
21: 0000000000000000 0 NOTYPE GLOBAL HIDDEN UND __dso_handle
22: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _ZNSt8ios_base4InitD1Ev
23: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __cxa_atexit
(I'm working on Ubuntu, not OS X.)
Note that there is only one global function defined in this object file and
its name is _Z3foov.
That's the mangled name of the C++ function called foo in shared-lib.cpp. That's
the name the linker sees.
Now the symbol table of wrapper-lib.o:
Symbol table '.symtab' contains 11 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 FILE LOCAL DEFAULT ABS wrapper-lib.c
2: 0000000000000000 0 SECTION LOCAL DEFAULT 1
3: 0000000000000000 0 SECTION LOCAL DEFAULT 3
4: 0000000000000000 0 SECTION LOCAL DEFAULT 4
5: 0000000000000000 0 SECTION LOCAL DEFAULT 6
6: 0000000000000000 0 SECTION LOCAL DEFAULT 7
7: 0000000000000000 0 SECTION LOCAL DEFAULT 5
8: 0000000000000000 21 FUNC GLOBAL DEFAULT 1 wrapper
9: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _GLOBAL_OFFSET_TABLE_
10: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND foo
This object file makes an undefined reference to foo, because wrapper-lib.c
is a C source file and you compiled it as such. C does not mangle names. No definition
of foo is provided by any object file in your linkage, so it fails with that
symbol unresolved.
To avoid this and accomplish your linkage, you can direct the C++ compiler
not to mangle the name foo, when compiling shared-lib.cpp. You do so like:
shared-lib.cpp
#include <iostream>
using namespace std;
extern "C" {
void foo()
{
cerr << "Hi from the shared lib" << endl;
}
} //extern "C"
Enclosing the definition of foo in extern "C" {...} has no effect on
C++ compilation except the one you want: the symbol foo will be emitted
as a C symbol; not mangled.
Having done that, you must of course follow suit in shared-lib.h:
shared-lib.h
#ifndef SHARED_LIB_H
#define SHARED_LIB_H
#ifdef __cplusplus
extern "C" {
#endif
void foo();
#ifdef __cplusplus
}
#endif
#endif
With those corrections, let's try again:
$ g++-6 -c -Wall -fpic -std=c++11 shared-lib.cpp
and check the symbol table:
$ readelf -s shared-lib.o | grep foo
14: 0000000000000000 50 FUNC GLOBAL DEFAULT 1 foo
Now the one global function defined is foo, not _Z3foov, and your
linkage will succeed.
If you want to write a C++ library that exports a C++ API and not a C API to
the linker, then you cannot call its API from C except by discovering the
mangled names of the API (with readelf, nm, objdump) and explicitly
calling those mangled names from C. Thus without those extern "C" fixes,
your linkage would also succeed with:
wrapper-lib.c
extern void _Z3foov(void);
int wrapper()
{
_Z3foov();
return 123;
}

Conflict between gcc and clang when compiling a code on Mac Osx El Capitan

I was compiling a code (wgrib) which needs C and Fortran. I have installed Xcode 7.3.1 and the relative command line tools for Xcode 7.3 on my MacOsx El Capitan.
I'm pasting the command line and the config.log after compiling wgrib (which failed).
export CC=/usr/bin/gcc
export FC=/usr/local/bin/gfortran
sudo make wgrib
makefile:362: *** ERROR, fortran compiler (enironment vararible FC) is not recognized. Stop.
vi config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by libaec configure 1.0.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --disable-shared --prefix=/usr/local/grib2
## --------- ##
## Platform. ##
## --------- ##
hostname = IMac-Arianna.local
uname -m = x86_64
uname -r = 15.6.0
uname -s = Darwin
uname -v = Darwin Kernel Version 15.6.0: Fri Feb 17 10:21:18 PST 2017; root:xnu-3248.60.11.4.1~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 15.6.0: Fri Feb 17 10:21:18 PST 2017; root:xnu-3248.60.11.4.1~1/RELEASE_X86_64
Kernel configured for up to 2 processors.
2 processors are physically available.
2 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1
Primary memory available: 4.00 gigabytes
Default processor set: 232 tasks, 903 threads, 2 processors
Load average: 4.19, Mach factor: 0.54
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /Library/Frameworks/Python.framework/Versions/3.5/bin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /Library/Frameworks/GDAL.framework/Programs
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: .
PATH: /Users/arianna/seadas6.1/scripts
PATH: /Users/arianna/seadas6.1/bin
PATH: .
PATH: /Users/arianna/seadas6.1/src/lib3/hdf4/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/local/bin
PATH: /opt/X11/bin
PATH: /Library/TeX/texbin
PATH: /Applications/itt/idl/idl80/bin/
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2430: checking build system type
configure:2444: result: x86_64-apple-darwin15.6.0
configure:2464: checking host system type
configure:2477: result: x86_64-apple-darwin15.6.0
configure:2518: checking how to print strings
configure:2545: result: printf
configure:2617: checking for gcc
configure:2644: result: /usr/bin/gcc
configure:2873: checking for C compiler version
configure:2882: /usr/bin/gcc --version >&5
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
configure:2893: $? = 0
configure:2882: /usr/bin/gcc -v >&5
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
configure:2893: $? = 0
configure:2882: /usr/bin/gcc -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:2893: $? = 1
configure:2882: /usr/bin/gcc -qversion >&5
clang: error: unknown argument: '-qversion'
clang: error: no input files
configure:2893: $? = 1
configure:2913: checking whether the C compiler works
configure:2935: /usr/bin/gcc -I/usr/local/grib2/include -Wall -Wmissing-prototypes -Wold-style-definition -Werror=format-security --fast-math -O3 -DGFORTRAN -fopenmp -I/usr/local/grib2/jasper-1.900.1/src/libjasper/include -I/usr/include conftest.c >&5
clang: error: unsupported option '--fast-math'
clang: error: unsupported option '-fopenmp'
clang: error: unsupported option '-fopenmp'
configure:2939: $? = 1
configure:2977: result: no
configure: failed program was:
| /* confdefs.h */
| /* confdefs.h */
| #define PACKAGE_NAME "libaec"
| #define PACKAGE_TARNAME "libaec"
| #define PACKAGE_VERSION "1.0.0"
| #define PACKAGE_STRING "libaec 1.0.0"
| #define PACKAGE_BUGREPORT "rosenhauer#dkrz.de"
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2982: error: in `/usr/local/grib2/libaec-1.0.0':
configure:2984: error: C compiler cannot create executables
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-apple-darwin15.6.0
ac_cv_env_CC_set=set
ac_cv_env_CC_value=/usr/bin/gcc
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-I/usr/local/grib2/include -Wall -Wmissing-prototypes -Wold-style-definition -Werror=format-security --fast-math -O3 -DGFORTRAN -fopenmp -I/usr/local/grib2/jasper-1.900.1/src/libjasper/include -I/usr/include '
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LT_SYS_LIBRARY_PATH_set=
ac_cv_env_LT_SYS_LIBRARY_PATH_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
AMDEP_TRUE=''
AMTAR=''
AM_BACKSLASH=''
AM_DEFAULT_V=''
AM_DEFAULT_VERBOSITY=''
AM_V=''
AR=''
AUTOCONF=''
AUTOHEADER=''
AUTOMAKE=''
AWK=''
CC='/usr/bin/gcc'
CCDEPMODE=''
CFLAGS='-I/usr/local/grib2/include -Wall -Wmissing-prototypes -Wold-style-definition -Werror=format-security --fast-math -O3 -DGFORTRAN -fopenmp -I/usr/local/grib2/jasper-1.900.1/src/libjasper/include -I/usr/include '
CFLAG_VISIBILITY=''
CPP=''
CPPFLAGS=''
CYGPATH_W=''
DEFS=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p=''
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/local/grib2'
program_transform_name='s,x,x,'
psdir='${docdir}'
runstatedir='${localstatedir}/run'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
pdfdir='${docdir}'
prefix='/usr/local/grib2'
program_transform_name='s,x,x,'
psdir='${docdir}'
runstatedir='${localstatedir}/run'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "libaec"
#define PACKAGE_TARNAME "libaec"
#define PACKAGE_VERSION "1.0.0"
#define PACKAGE_STRING "libaec 1.0.0"
#define PACKAGE_BUGREPORT "rosenhauer#dkrz.de"
#define PACKAGE_URL ""
configure: exit 77
You're using clang, not the GNU gcc, as noted by the output:
/usr/bin/gcc --version
Apple LLVM version 7.3.0 (clang-703.0.31)
libaec is known to have compatibility issues with clang, using the real gcc instead should fix your problem:
brew install gcc
export CC=gcc-9 # Use the version listed in `ls /usr/local/bin/gcc-*`, not clang gcc
export FC=gfortran
make

g++ "value temporarily unavailable, due to optimizations"

I'm getting some "value temporarily unavailable, due to optimizations" problems, but I am compiling with debug enabled, as far as I know.
I.e. I'm using -g -O0 -fno-inline flags, so I'm not sure why is this still happening. Is it some flag I missed?
Compiler is g++-mp-4.6 (GCC) 4.6.3, OS is OSX 10.6 Darwin Palace-of-the-Nine-Moons.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
Full compile options are g++-mp-4.6 -Wall -Werror -Wno-unused -g -O0 -fno-inline -I/usr/local/include -I../allig -std=c++0x -c src/Toolbox.cpp -o o/Toolbox.o for every file.
gdb session:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000021
[Switching to process 23874]
0x0000000100035d64 in al_get_bitmap_width ()
(gdb) bt
#0 0x0000000100035d64 in al_get_bitmap_width ()
#1 0x0000000100005e47 in Icon::resize (this=0x101244530, w=<value temporarily unavailable, due to optimizations>, h=<value temporarily unavailable, due to optimizations>) at ../allig/Icon.cpp:24
#2 0x0000000100005e1f in Icon::create_icon (this=0x101244530, _icon_size=<value temporarily unavailable, due to optimizations>) at ../allig/Icon.cpp:20
#3 0x000000010000ae24 in Icontainer::add_icon (this=0x101244210, tt=0x101244530) at ../allig/Icontainer.cpp:18
#4 0x0000000100002d58 in _al_mangled_main (argc=1, argv=0x7fff5fbff600) at src/mapedit.cpp:202
#5 0x000000010009ff17 in +[AllegroAppDelegate app_main:] ()
#6 0x00007fff82d45114 in __NSThread__main__ ()
#7 0x00007fff81f4afd6 in _pthread_start ()
#8 0x00007fff81f4ae89 in thread_start ()
(gdb) up
#1 0x0000000100005e47 in Icon::resize (this=0x101244530, w=<value temporarily unavailable, due to optimizations>, h=<value temporarily unavailable, due to optimizations>) at ../allig/Icon.cpp:24
24 ow=al_get_bitmap_width(icon);
Current language: auto; currently c++
[...]
(gdb) up
#2 0x0000000100005e1f in Icon::create_icon (this=0x101244530, _icon_size=<value temporarily unavailable, due to optimizations>) at ../allig/Icon.cpp:20
20 resize(_icon_size,_icon_size);
(gdb) print _icon_size
$2 = <value temporarily unavailable, due to optimizations>
(gdb) up
#3 0x000000010000ae24 in Icontainer::add_icon (this=0x101244210, tt=0x101244530) at ../allig/Icontainer.cpp:18
18 tt->create_icon(icon_size);
(gdb) print icon_size
$3 = 32 ' '
(gdb) quit
code snippets:
void Icon::resize (unsigned char w, unsigned char h) {
unsigned short ow,oh;
ow=al_get_bitmap_width(icon);
up
void Icon::create_icon (unsigned char _icon_size) {
resize(_icon_size,_icon_size);
}
up
int Icontainer::add_icon (Icon *tt) {
int ret=icons.size();
tt->tool=TOOL_TILE;
tt->create_icon(icon_size);
finally here the icon size was available.

Using wxWidgets and OpenGL by command line on Mac OS X

I'm trying to compile a project I made under Linux Ubuntu 10.4 with wxWidgets and OpenGL, written in C++ language, on my MacBook with Mac OS X 10.7 (Lion). I installed wxWidgets with this configuration:
$ arch_flags="-arch i386"
$ ../configure CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" --enable-unicode --enable-debug --disable-shared --with-macosx-sdk=/Developer/SDKs/MacOSX10.6.sdk --with-macosx-version-min=10.6 --with-opengl
Compiling, I obtains a lot of warnings. The compilation fails at the linking phase:
[...]
g++gcc-4.6.x `wx-config --cxxflags` -g -std=c++0x -c -o GUI.o GUI.cc
In file included from /opt/local/include/wx-2.8/wx/mac/glcanvas.h:4:0,
from /opt/local/include/wx-2.8/wx/glcanvas.h:60,
from Fenetre.h:5,
from GUI.cc:2:
/opt/local/include/wx-2.8/wx/mac/carbon/glcanvas.h:49:37: warning: ‘AGLDrawable’ is deprecated (declared at /System/Library/Frameworks/AGL.framework/Headers/agl.h:47) [-Wdeprecated-declarations]
/opt/local/include/wx-2.8/wx/mac/carbon/glcanvas.h:53:21: warning: ‘AGLDrawable’ is deprecated (declared at /System/Library/Frameworks/AGL.framework/Headers/agl.h:47) [-Wdeprecated-declarations]
[...]
g++gcc-4.6.x exerciceP13.o GUI.o Fenetre.o Vue_OpenGL.o Balle.o ChampForces.o Dessinable.o Exception.o Ressort.o Integrateur.o IntegrateurEuler.o ObjetMobile.o Obstacle.o Pendule.o PendulePlan.o PlanInfini.o Vecteur.o Systeme.o Balle3D.o PendulePlan3D.o Brique3D.o Brique.o PlanInfini3D.o Ressort3D.o Couleur.o IntegrateurNewmark.o Vent.o Ventilateur3D.o Trampoline3D.o IntRungKut.o ChampVitesse.o TapisRoulant3D.o PenduleSpherique.o Cylindre.o Cylindre3D.o `wx-config --libs gl,core,base` -o exerciceP13
g++gcc-4.6.x: error: i386: No such file or directory
g++gcc-4.6.x: error: unrecognized option ‘-arch’
make: *** [exerciceP13] Error 1
Here my Makefile et my includes on graphical classes headers:
CC = g++gcc-4.6.x
CXX = g++gcc-4.6.x
CXXFLAGS= `wx-config --cxxflags` -g -std=c++0x
LDLIBS = `wx-config --libs gl,core,base`
all: exerciceP13
exerciceP13: exerciceP13.o GUI.o Fenetre.o Vue_OpenGL.o Balle.o ChampForces.o Dessinable.o Exception.o Ressort.o Integrateur.o IntegrateurEuler.o ObjetMobile.o Obstacle.o Pendule.o PendulePlan.o PlanInfini.o Vecteur.o Systeme.o Balle3D.o PendulePlan3D.o Brique3D.o Brique.o PlanInfini3D.o Ressort3D.o Couleur.o IntegrateurNewmark.o Vent.o Ventilateur3D.o Trampoline3D.o IntRungKut.o ChampVitesse.o TapisRoulant3D.o PenduleSpherique.o Cylindre.o Cylindre3D.o
exerciceP13.o: exerciceP13.cc GUI.h
GUI.o: GUI.h GUI.cc Fenetre.h
Fenetre.o: Fenetre.h Fenetre.cc Vue_OpenGL.h
Vue_OpenGL.o: Vue_OpenGL.h Vue_OpenGL.cc Systeme.h Balle3D.h PendulePlan3D.h PlanInfini.h Brique3D.h PlanInfini3D.h Ressort3D.h IntegrateurEuler.h IntegrateurNewmark.h Ventilateur3D.h Trampoline3D.h Vent.h IntRungKut.h ChampVitesse.h TapisRoulant3D.h Cylindre3D.h
Balle.o: Balle.h Balle.cc ObjetMobile.h Vecteur.h
Brique.o: Brique.h Brique.cc Obstacle.h Vecteur.h ObjetMobile.h
ChampForces.o: ChampForces.h ChampForces.cc Vecteur.h Balle.h Dessinable.h
Dessinable.o: Dessinable.h Dessinable.cc
Exception.o: Exception.h Exception.cc
Integrateur.o: Integrateur.h Integrateur.cc ObjetMobile.h
IntegrateurEuler.o: IntegrateurEuler.h IntegrateurEuler.cc Integrateur.h ObjetMobile.h
ObjetMobile.o: ObjetMobile.h ObjetMobile.cc Vecteur.h Dessinable.h
Obstacle.o: Obstacle.h Obstacle.cc Vecteur.h ObjetMobile.h Dessinable.h
Pendule.o: Pendule.h Pendule.cc ObjetMobile.h Vecteur.h
PendulePlan.o: PendulePlan.h PendulePlan.cc Pendule.h Vecteur.h Balle.h
PlanInfini.o: PlanInfini.h PlanInfini.cc Vecteur.h Obstacle.h
Vecteur.o: Vecteur.h Vecteur.cc Exception.h
Systeme.o: Systeme.h Systeme.cc ObjetMobile.h Obstacle.h ChampForces.h Integrateur.h Dessinable.h
Balle3D.o: Balle3D.h Balle3D.cc Balle.h Couleur.h
PendulePlan3D.o: PendulePlan3D.h PendulePlan3D.cc PendulePlan.h Couleur.h
Brique3D.o: Brique3D.h Brique3D.cc Brique.h Couleur.h
PlanInfini3D.o: PlanInfini.h PlanInfini.cc PlanInfini.h Couleur.h
Ressort.o: Ressort.cc Ressort.h Vecteur.h ObjetMobile.h
Ressort3D.o: Ressort3D.cc Ressort3D.h Ressort.h Couleur.h
Couleur.o: Couleur.h Couleur.cc
IntegrateurNewmark.o: IntegrateurNewmark.h IntegrateurNewmark.cc Integrateur.h
Vent.o: Vent.cc Vent.h Vecteur.h Brique.h ObjetMobile.h ChampForces.h Ventilateur3D.h
Ventilateur3D.o: Ventilateur3D.h Ventilateur3D.cc Vecteur.h Vent.h Systeme.h Brique3D.h Dessinable.h
Trampoline3D.o: Trampoline3D.h Trampoline3D.cc Brique3D.h ObjetMobile.h Systeme.h Dessinable.h
ChampVitesse.o: ChampVitesse.h ChampVitesse.cc Vecteur.h ChampForces.h ObjetMobile.h Brique.h TapisRoulant3D.h
TapisRoulant3D.o: TapisRoulant3D.h TapisRoulant3D.cc Vecteur.h Brique3D.h Systeme.h ChampVitesse.h Dessinable.h
IntRungKut.o: IntRungKut.h IntRungKut.cc Integrateur.h ObjetMobile.h Vecteur.h
PenduleSpherique.o: PenduleSpherique.h PenduleSpherique.cc Pendule.h Vecteur.h
Cylindre.o: Cylindre.h Cylindre.cc Vecteur.h Obstacle.h ObjetMobile.h
Cylindre3D.o: Cylindre3D.h Cylindre3D.cc Vecteur.h Couleur.h Cylindre.h
clean:
rm -f *.o
Includes:
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "wx/glcanvas.h" // Pour combiner wxWidgets et OpenGL
I finally used Macports to install both GCC 4.7 +universal and wxWidgets. It worked very well.

Resources