macosforge / alac

The Apple Lossless Audio Codec (ALAC) is a lossless audio codec developed by Apple and deployed on all of its platforms and devices.
https://macosforge.github.io/alac/
Apache License 2.0
353 stars 63 forks source link

Cannot build alacconvert under Slackware 13.37: makefile problem? #4

Closed macosforgebot closed 8 years ago

macosforgebot commented 13 years ago

andrew@… originally submitted this as ticket:4


Using the latest alac source code from subversion repository:

andrew@skamandros~/source/alac/alacconvert$ svn info
Path: .
URL: http://svn.macosforge.org/repository/alac/trunk
Repository Root: http://svn.macosforge.org/repository/alac
Repository UUID: 92fd1c79-0083-48bf-97f5-1a84ada3fd0a
Revision: 3
Node Kind: directory
Schedule: normal
Last Changed Author: ealdrich@apple.com
Last Changed Rev: 3
Last Changed Date: 2011-10-27 06:54:09 +1100 (Thu, 27 Oct 2011)

I am unable to successfully compile alacconvert in /convert-utility with the following error message:

andrew@skamandros~/source/alac/alacconvert/convert-utility$ make
g++ -I ../codec -g -O3 -c main.cpp
In file included from ../codec/ALACEncoder.h:29:0,
                 from main.cpp:26:
../codec/ALACAudioTypes.h:64:32: warning: multi-character character constant
../codec/ALACAudioTypes.h:65:28: warning: multi-character character constant
../codec/ALACAudioTypes.h:154:22: warning: multi-character character constant
../codec/ALACAudioTypes.h:182:26: warning: multi-character character constant
In file included from main.cpp:31:0:
CAFFileALAC.h:69:33: warning: multi-character character constant
CAFFileALAC.h:75:40: warning: multi-character character constant
CAFFileALAC.h:76:34: warning: multi-character character constant
CAFFileALAC.h:77:37: warning: multi-character character constant
CAFFileALAC.h:78:31: warning: multi-character character constant
CAFFileALAC.h:79:35: warning: multi-character character constant
CAFFileALAC.h:80:34: warning: multi-character character constant
main.cpp:134:30: warning: multi-character character constant
main.cpp:134:57: warning: multi-character character constant
main.cpp:167:35: warning: multi-character character constant
main.cpp:206:24: warning: multi-character character constant
main.cpp:216:28: warning: multi-character character constant
main.cpp:225:26: warning: multi-character character constant
main.cpp:349:14: warning: multi-character character constant
main.cpp:360:26: warning: multi-character character constant
main.cpp:373:14: warning: multi-character character constant
main.cpp:618:27: warning: multi-character character constant
main.cpp:684:27: warning: multi-character character constant
main.cpp:716:23: warning: multi-character character constant
main.cpp:724:35: warning: multi-character character constant
g++ -I ../codec -g -O3 -c CAFFileALAC.cpp
In file included from CAFFileALAC.h:30:0,
                 from CAFFileALAC.cpp:20:
../codec/ALACAudioTypes.h:64:32: warning: multi-character character constant
../codec/ALACAudioTypes.h:65:28: warning: multi-character character constant
../codec/ALACAudioTypes.h:154:22: warning: multi-character character constant
../codec/ALACAudioTypes.h:182:26: warning: multi-character character constant
In file included from CAFFileALAC.cpp:20:0:
CAFFileALAC.h:69:33: warning: multi-character character constant
CAFFileALAC.h:75:40: warning: multi-character character constant
CAFFileALAC.h:76:34: warning: multi-character character constant
CAFFileALAC.h:77:37: warning: multi-character character constant
CAFFileALAC.h:78:31: warning: multi-character character constant
CAFFileALAC.h:79:35: warning: multi-character character constant
CAFFileALAC.h:80:34: warning: multi-character character constant
CAFFileALAC.cpp:41:18: warning: multi-character character constant
CAFFileALAC.cpp:305:18: warning: multi-character character constant
CAFFileALAC.cpp:343:18: warning: multi-character character constant
CAFFileALAC.cpp:387:18: warning: multi-character character constant
CAFFileALAC.cpp:417:18: warning: multi-character character constant
(cd ../codec; make)
make[1]: Entering directory `/home/andrew/source/alac/alacconvert/codec'
make[1]: `libalac.a' is up to date.
make[1]: Leaving directory `/home/andrew/source/alac/alacconvert/codec'
g++ -Wall -L../codec -lalac main.o CAFFileALAC.o  -o alacconvert
main.o: In function `EncodeALAC(_IO_FILE*, _IO_FILE*, AudioFormatDescription, AudioFormatDescription, int)':
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:400: undefined reference to `ALACEncoder::ALACEncoder()'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:413: undefined reference to `ALACEncoder::GetMagicCookieSize(unsigned int)'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:415: undefined reference to `ALACEncoder::GetMagicCookie(void*, unsigned int*)'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:487: undefined reference to `Swap24'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:472: undefined reference to `Swap16'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:480: undefined reference to `Swap32'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:540: undefined reference to `Swap24'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:525: undefined reference to `Swap16'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:533: undefined reference to `Swap32'
main.o: In function `DecodeALAC(_IO_FILE*, _IO_FILE*, AudioFormatDescription, AudioFormatDescription, int, unsigned int)':
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:603: undefined reference to `ALACDecoder::ALACDecoder()'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:612: undefined reference to `ALACDecoder::Init(void*, unsigned int)'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:615: undefined reference to `BitBufferInit'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:704: undefined reference to `ALACDecoder::~ALACDecoder()'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:665: undefined reference to `ALACDecoder::Decode(BitBuffer*, unsigned char*, unsigned int, unsigned int, unsigned int*)'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:682: undefined reference to `BitBufferReset'
CAFFileALAC.o: In function `WriteCAFFdescChunk(_IO_FILE*, AudioFormatDescription)':
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:85: undefined reference to `SwapFloat64NtoB'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:86: undefined reference to `Swap32NtoB'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:87: undefined reference to `Swap32NtoB'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:88: undefined reference to `Swap32NtoB'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:89: undefined reference to `Swap32NtoB'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:90: undefined reference to `Swap32NtoB'
CAFFileALAC.o:/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:91: more undefined references to `Swap32NtoB' follow
CAFFileALAC.o: In function `WriteCAFFpaktChunkHeader(_IO_FILE*, port_CAFPacketTableHeader*, unsigned int)':
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:167: undefined reference to `Swap64NtoB'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:168: undefined reference to `Swap64NtoB'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:169: undefined reference to `Swap32NtoB'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:170: undefined reference to `Swap32NtoB'
CAFFileALAC.o: In function `GetCAFFdescFormat(_IO_FILE*, AudioFormatDescription*)':
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:420: undefined reference to `Swap32BtoN'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:421: undefined reference to `Swap32BtoN'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:422: undefined reference to `SwapFloat64BtoN'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:423: undefined reference to `Swap32BtoN'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:424: undefined reference to `Swap32BtoN'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:425: undefined reference to `Swap32BtoN'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:443: undefined reference to `Swap32BtoN'
collect2: ld returned 1 exit status
make: *** [alacconvert] Error 1

A fix has been suggested here:

http://mtakagi.tumblr.com/post/12027648706/apple-lossless-audio-codec-freebsd

which suggests replacing the current makefile line:

$(CC) $(LFLAGS) $(OBJS) -o alacconvert

with this:

 $(CC) $(OBJS) -o alacconvert $(LFLAGS)

and certainly this permits compilation to succeed on my system. This is under gcc 4.5.2.

Please let me know if more information is required.

Andrew Strong

macosforgebot commented 13 years ago

macosforge@… originally submitted this as comment:1:⁠ticket:4


This is a duplicate of #⁠1

macosforgebot commented 8 years ago

@ryandesign originally submitted this as comment:2:⁠ticket:4