Failure to build: 64bit Slackware 14.2
exhale builds and runs fine on the latest development version of Slackware Linux which uses gcc 9.3.0 but fails to build on Slackware 14.2 (the most recent 'release' version) which uses gcc 5.5.0.
The full build shows:
andrew@corinth~/Desktop/exhale-v1.0.2$ make release make -C src/lib release MM32=0 make[1]: Entering directory '/home/andrew/Desktop/exhale-v1.0.2/src/lib' g++ -c -MMD -MF ../../build/bitAllocation.r.d -MT ../../build/bitAllocation.r.o -fPIC -DMSYS_LINUX -DMSYS_UNIX_LARGEFILE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/home/andrew/Desktop/exhale-v1.0.2/src/lib/../../include -Wall -Werror -Wno-sign-compare -Wshadow -D_FILE_OFFSET_BITS=64 -O3 -Wuninitialized -o ../../build/bitAllocation.r.o /home/andrew/Desktop/exhale-v1.0.2/src/lib/../../src/lib/bitAllocation.cpp /home/andrew/Desktop/exhale-v1.0.2/src/lib/../../src/lib/bitAllocation.cpp:71:3: error: identifier 'nullptr' is a keyword in C++11 [-Werror=c++0x-compat] if ((meanSpecFlatInCh == nullptr) || (nChannels > USAC_MAX_NUM_CHANNELS)) ^ In file included from /home/andrew/Desktop/exhale-v1.0.2/src/lib/../../src/lib/bitAllocation.cpp:11:0: /home/andrew/Desktop/exhale-v1.0.2/src/lib/../../src/lib/exhaleLibPch.h:61:26: error: scoped enums only available with -std=c++11 or -std=gnu++11 [-Werror] typedef enum ELEM_TYPE : int8_t ^ /home/andrew/Desktop/exhale-v1.0.2/src/lib/../../src/lib/exhaleLibPch.h:71:26: error: scoped enums only available with -std=c++11 or -std=gnu++11 [-Werror] typedef enum USAC_WSEQ : uint8_t ^ /home/andrew/Desktop/exhale-v1.0.2/src/lib/../../src/lib/exhaleLibPch.h:81:26: error: scoped enums only available with -std=c++11 or -std=gnu++11 [-Werror] typedef enum USAC_WSHP : uint8_t ^ /home/andrew/Desktop/exhale-v1.0.2/src/lib/../../src/lib/bitAllocation.cpp: In member function 'void BitAllocator::getChAverageSpecFlat(uint8_t*, unsigned int)': /home/andrew/Desktop/exhale-v1.0.2/src/lib/../../src/lib/bitAllocation.cpp:71:28: error: 'nullptr' was not declared in this scope if ((meanSpecFlatInCh == nullptr) || (nChannels > USAC_MAX_NUM_CHANNELS)) ^ /home/andrew/Desktop/exhale-v1.0.2/src/lib/../../src/lib/bitAllocation.cpp: In member function 'void BitAllocator::getChAverageTempFlat(uint8_t*, unsigned int)': /home/andrew/Desktop/exhale-v1.0.2/src/lib/../../src/lib/bitAllocation.cpp:80:28: error: 'nullptr' was not declared in this scope if ((meanTempFlatInCh == nullptr) || (nChannels > USAC_MAX_NUM_CHANNELS)) ^ /home/andrew/Desktop/exhale-v1.0.2/src/lib/../../src/lib/bitAllocation.cpp: In member function 'uint8_t BitAllocator::getScaleFac(uint32_t, const int32_t*, uint8_t, uint32_t)': /home/andrew/Desktop/exhale-v1.0.2/src/lib/../../src/lib/bitAllocation.cpp:97:21: error: 'nullptr' was not declared in this scope if ((sfbSignal == nullptr) || (sfbWidth == 0) || (sfbRmsValue < 46)) ^ /home/andrew/Desktop/exhale-v1.0.2/src/lib/../../src/lib/bitAllocation.cpp: In member function 'unsigned int BitAllocator::initSfbStepSizes(const SfbGroupData* const*, uint8_t, const uint32_t*, const uint32_t*, unsigned int, unsigned int, uint32_t*, unsigned int, bool)': /home/andrew/Desktop/exhale-v1.0.2/src/lib/../../src/lib/bitAllocation.cpp:153:21: error: 'nullptr' was not declared in this scope if ((groupData == nullptr) || (specAnaStats == nullptr) || (tempAnaStats == nullptr) || (sfbStepSizes == nullptr) || ^ cc1plus: all warnings being treated as errors ../makefile.base:116: recipe for target '../../build/bitAllocation.r.o' failed make[1]: *** [../../build/bitAllocation.r.o] Error 1 make[1]: Leaving directory '/home/andrew/Desktop/exhale-v1.0.2/src/lib' makefile:25: recipe for target 'release' failed make: *** [release] Error 2 andrew@corinth~/Desktop/exhale-v1.0.2$
The errors could be fixed and successful compile allowed on the older gcc by making the following change in src/makefile.base:
CPPFLAGS = -fPIC $(DEFS) -I$(CURDIR)/$(DIR_INC) -Wall -Werror -Wno-sign-compare -Wshadow -D_FILE_OFFSET_BITS=64 -std=c++11
Please let me know if you need more information concerning this error or my build environment.
Andrew Strong