[MacPorts] #62969: libsndfile @1.0.31_1+universal: compie fails, preprocessor macros about architecture missing

MacPorts noreply at macports.org
Tue May 25 21:00:45 UTC 2021


#62969: libsndfile @1.0.31_1+universal: compie fails, preprocessor macros about
architecture missing
--------------------+------------------------
 Reporter:  JDLH    |      Owner:  (none)
     Type:  defect  |     Status:  new
 Priority:  Normal  |  Milestone:
Component:  ports   |    Version:  2.7.0
 Keywords:          |       Port:  libsndfile
--------------------+------------------------
 When upgrading outdated port libsndfile @1.0.31_0+universal to libsndfile
 @1.0.31_1+universal, build fails with a few compiler errors. All seem to
 be a matter of architecture-related preprocessor macros not being defined.

 Build log attached. The interesting messages appear to be:
 {{{
 … [elided] …
 :info:build libtool: compile:  /usr/bin/clang -DHAVE_CONFIG_H -I. -I./src
 -I./src -I./include -I./include -I/opt/local/include -D_FORTIFY_SOURCE=2
 -I/opt/local/include/opus -pipe -Os -arch x86_64 -arch i386 -Wall -Wextra
 -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wwrite-strings -Wundef
 -Wuninitialized -Winit-self -Wno-format-truncation -Wvla -Wbad-function-
 cast -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wmissing-
 declarations -Waggregate-return -c src/ulaw.c -o src/libcommon_la-ulaw.o
 >/dev/null 2>&1
 :info:build In file included from src/pcm.c:24:
 :info:build ./src/sfendian.h:125:27: error: invalid token at start of a
 preprocessor expression
 :info:build #if (CPU_IS_LITTLE_ENDIAN == 1)
 :info:build                           ^
 :info:build ./src/sfendian.h:127:26: error: invalid token at start of a
 preprocessor expression
 :info:build #elif (CPU_IS_BIG_ENDIAN == 1)
 :info:build                          ^
 :info:build ./src/sfendian.h:130:3: error: "Target CPU endian-ness
 unknown. May need to hand edit src/sfconfig.h"
 :info:build         #error "Target CPU endian-ness unknown. May need to
 hand edit src/sfconfig.h"
 … [elided] …
 :info:build src/pcm.c:137:23: error: expected expression
 :info:build         if (CPU_IS_BIG_ENDIAN)
 :info:build                              ^
 :info:build src/pcm.c:315:12: warning: implicit declaration of function
 'LE2H_32' is invalid in C99 [-Wimplicit-function-declaration]
 :info:build         {       value = LE2H_32 (src [count]) ;
 :info:build                         ^
 :info:build src/pcm.c:315:12: warning: this function declaration is not a
 prototype [-Wstrict-prototypes]
 :info:build src/pcm.c:325:12: warning: implicit declaration of function
 'BE2H_32' is invalid in C99 [-Wimplicit-function-declaration]
 :info:build         {       value = BE2H_32 (src [count]) ;
 :info:build                         ^
 :info:build src/pcm.c:325:12: warning: this function declaration is not a
 prototype [-Wstrict-prototypes]
 … [elided] …
 :info:build 17 warnings and 15 errors generated.
 :info:build make[2]: *** [src/libcommon_la-pcm.lo] Error 1
 … [elided] …
 }}}

 Observed on macOS 10.13.6 High Sierra.

 My current installed version is @1.0.31_0+universal, and I did a `port
 upgrade outdated` a few days ago. Thus I suspect that this problem was
 triggered by the change to @1.0.31_1 in
 [changeset:fcf67122a5408b48c79b2344a3fd5e88dc14fffa/macports-ports commit
 fcf6712], which addressed #62896 .

-- 
Ticket URL: <https://trac.macports.org/ticket/62969>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list