[odb-users] Problem building libodb-2.4.0

Aldo Laiseca alaiseca at gmail.com
Tue Oct 17 17:32:10 EDT 2023


Hi, I was trying to build libodb 2.4.0 in a Mac OS X BigSur (OS 11.7) with XCode version 13.2.1 and Clang 13.0.0. Unfortunately I am getting this error as soon as I execute the make command: 

Making all in odb
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
depbase=`echo callback.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
	/bin/sh ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H   -I'..' -I'..' -DLIBODB_DYNAMIC_LIB   -std=c++11 -D_THREAD_SAFE  -MT callback.lo -MD -MP -MF $depbase.Tpo -c -o callback.lo callback.cxx &&\
	mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  g++ -DHAVE_CONFIG_H -I.. -I.. -DLIBODB_DYNAMIC_LIB -std=c++11 -D_THREAD_SAFE -MT callback.lo -MD -MP -MF .deps/callback.Tpo -c callback.cxx  -fno-common -DPIC -o .libs/callback.o
In file included from callback.cxx:5:
In file included from ../odb/callback.hxx:10:
In file included from ../odb/forward.hxx:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:37:
../version:1:1: error: expected unqualified-id
2.4.0
^
In file included from callback.cxx:5:
In file included from ../odb/callback.hxx:10:
In file included from ../odb/forward.hxx:10:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:49:9: error: no member named 'ptrdiff_t' in the global namespace
using ::ptrdiff_t;
      ~~^
2 errors generated.
make[2]: *** [callback.lo] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1

Looks like the libodb source code is not compatible with this version of the Clang compiler, even though I have set -std=c++11 option in CXXFLAGS as part of the configure command. 

Is there a workaround to make this work? Are you planning to release a newer version?

Thanks in advance

 




More information about the odb-users mailing list