Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » compiling FLAC

This thread is locked; no one can reply to it. rss feed Print
 1   2 
compiling FLAC
William Labbett
Member #4,486
March 2004
avatar

Afraid it's me again. Trying to compile FLAC, I get this from the console window.

I know a bit about makefiles but not sure what the problem is here.

{"name":"603059","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/5\/15800796831a90d1b4b04fce17019b72.png","w":754,"h":312,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/5\/15800796831a90d1b4b04fce17019b72"}603059

Maybe there's an easier way to get FLAC installed other than compiling from source ?

StevenVI
Member #562
July 2000
avatar

This page may help you, if you're just looking for a program to compress/decompress .flac files: http://flac.sourceforge.net/download.html.

__________________________________________________
Skoobalon Software
[ Lander! v2.5 ] [ Zonic the Hog v1.1 ] [ Raid 2 v1.0 ]

Trent Gamblin
Member #261
April 2000
avatar

I've seen that error before when using a non-mingw version of make... but you are typing mingw32-make so I assume you didn't just rename make.exe? The other thing I would check is that sh.exe is not in your path when you run mingw32-make.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

image said:

cd libFLAC ; mingw32-make -f makefile.lite release

The error is in the semicolon. Notice in the earlier lines how it uses a double ampersand to connect commands? Find that line in flac-1.2.1\src\makefile.lite (possibly under the release target) and change the semicolon to a double ampersand.

Note : It would have been easier to quote your log if you had pasted it into <pre></pre> tags. (Right click on the console title bar and select 'Edit->Select All', then right click on the console title bar again and select 'Edit->Copy'. Now you can paste the text into something else.)

William Labbett
Member #4,486
March 2004
avatar

Thanks a lot Edgar.

I fixed that little issue. I'd never have spotted it myself.

The error I'm getting now is :-

C:\flac-1.2.1\flac-1.2.1>mingw32-make -f Makefile.lite
(cd doc && mingw32-make -f Makefile.lite)
mingw32-make[1]: Entering directory `C:/flac-1.2.1/flac-1.2.1/doc'
mingw32-make[1]: `FLAC.tag' is up to date.
mingw32-make[1]: Leaving directory `C:/flac-1.2.1/flac-1.2.1/doc'
(cd src && mingw32-make -f Makefile.lite release)
mingw32-make[1]: Entering directory `C:/flac-1.2.1/flac-1.2.1/src'
(cd libFLAC && mingw32-make -f Makefile.lite release)
mingw32-make[2]: Entering directory `C:/flac-1.2.1/flac-1.2.1/src/libFLAC'
nasm -f elf -d OBJ_FORMAT_elf -i ia32/ ia32/bitreader_asm.nasm -o ia32/bitreader
_asm.release.o
process_begin: CreateProcess(NULL, nasm -f elf -d OBJ_FORMAT_elf -i ia32/ ia32/b
itreader_asm.nasm -o ia32/bitreader_asm.release.o, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make[2]: *** [ia32/bitreader_asm.release.o] Error 2
mingw32-make[2]: Leaving directory `C:/flac-1.2.1/flac-1.2.1/src/libFLAC'
mingw32-make[1]: *** [libFLAC] Error 2
mingw32-make[1]: Leaving directory `C:/flac-1.2.1/flac-1.2.1/src'
mingw32-make: *** [src] Error 2

C:\flac-1.2.1\flac-1.2.1>

This line seems to cause the error.

nasm -f elf -d OBJ_FORMAT_elf -i ia32/ ia32/bitreader_asm.nasm -o ia32/bitreader
_asm.release.o

When it says cannot find the file specified which file does it mean ?

Arthur Kalliokoski
Second in Command
February 2005
avatar

nasm -f elf -d OBJ_FORMAT_elf -i ia32/ ia32/bitreader_asm.nasm -o ia32/bitreader
_asm.release.o

Whenever I used nasm in windows I believe it was like

nasm -fwin32 myprog.asm -o myprog.o

They all watch too much MSNBC... they get ideas.

William Labbett
Member #4,486
March 2004
avatar

cheers

When it says

nasm -f elf

doesn't that mean there should be a file elf in the working directory ?

Arthur Kalliokoski
Second in Command
February 2005
avatar

Read the output of

nasm <enter>

then (as suggested)

nasm -h

then

nasm -hf

They all watch too much MSNBC... they get ideas.

William Labbett
Member #4,486
March 2004
avatar

Thanks.

I did what you said and got this :/


C:\flac-1.2.1\flac-1.2.1>nasm
'nasm' is not recognized as an internal or external command,
operable program or batch file.


Looks like I don't even have nasm installed :'(

AMCerasoli
Member #11,955
May 2010
avatar

I'm also having problem with flac.

But I'm using msys.bat

I type:

Armando@Toshiba /c/flac
$ ./configure
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... c:/mingw/mingw32/bin/ld.exe
checking if the linker (c:/mingw/mingw32/bin/ld.exe) is GNU ld... yes
checking for c:/mingw/mingw32/bin/ld.exe option to reload object files... -r
checking for BSD-compatible nm... /bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... file_magic file format pei*-i386(.*architecture: i386)?
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... no
checking dlfcn.h presence... no
checking for dlfcn.h... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 8192
checking command to parse /bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag  works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT
checking if gcc PIC flag -DDLL_EXPORT works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (c:/mingw/mingw32/bin/ld.exe) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... c:/mingw/mingw32/bin/ld.exe
checking if the linker (c:/mingw/mingw32/bin/ld.exe) is GNU ld... yes
checking whether the g++ linker (c:/mingw/mingw32/bin/ld.exe) supports shared libraries... yes
checking for g++ option to produce PIC... -DDLL_EXPORT
checking if g++ PIC flag -DDLL_EXPORT works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (c:/mingw/mingw32/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
appending configuration tag "F77" to libtool
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking whether make sets $(MAKE)... (cached) yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for _LARGE_FILES value needed for large files... no
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for fseeko... no
checking for void*... yes
checking size of void*... 4
checking whether byte ordering is bigendian... no
checking for socklen_t... no
checking for getopt_long... yes
checking for doxygen... no
checking for xmms-config... no
checking for XMMS - version >= 0.9.5.1... no
*** The xmms-config script installed by XMMS could not be found.
*** If XMMS was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the XMMS_CONFIG environment variable to the
*** full path to xmms-config.
configure: WARNING: *** XMMS >= 0.9.5.1 not installed - XMMS support will not be built
checking for Ogg... yes
checking for ld used by GCC... c:/mingw/mingw32/bin/ld.exe
checking if the linker (c:/mingw/mingw32/bin/ld.exe) is GNU ld... yes
checking for shared library run path origin... done
checking for iconv... yes
checking how to link with libiconv... -liconv
checking for iconv declaration...
         extern size_t iconv (iconv_t cd, const char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for nl_langinfo and CODESET... no
checking for docbook-to-man... no
checking for docbook2man... no
checking for nasm... no
checking for as... as
checking for gas... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/libFLAC/Makefile
config.status: creating src/libFLAC/flac.pc
config.status: creating src/libFLAC/ia32/Makefile
config.status: creating src/libFLAC/ppc/Makefile
config.status: creating src/libFLAC/ppc/as/Makefile
config.status: creating src/libFLAC/ppc/gas/Makefile
config.status: creating src/libFLAC/include/Makefile
config.status: creating src/libFLAC/include/private/Makefile
config.status: creating src/libFLAC/include/protected/Makefile
config.status: creating src/libFLAC++/Makefile
config.status: creating src/libFLAC++/flac++.pc
config.status: creating src/flac/Makefile
config.status: creating src/metaflac/Makefile
config.status: creating src/monkeys_audio_utilities/Makefile
config.status: creating src/monkeys_audio_utilities/flac_mac/Makefile
config.status: creating src/monkeys_audio_utilities/flac_ren/Makefile
config.status: creating src/plugin_common/Makefile
config.status: creating src/plugin_winamp2/Makefile
config.status: creating src/plugin_winamp2/include/Makefile
config.status: creating src/plugin_winamp2/include/winamp2/Makefile
config.status: creating src/plugin_xmms/Makefile
config.status: creating src/share/Makefile
config.status: creating src/share/getopt/Makefile
config.status: creating src/share/grabbag/Makefile
config.status: creating src/share/replaygain_analysis/Makefile
config.status: creating src/share/replaygain_synthesis/Makefile
config.status: creating src/share/replaygain_synthesis/include/Makefile
config.status: creating src/share/replaygain_synthesis/include/private/Makefile
config.status: creating src/share/utf8/Makefile
config.status: creating src/test_grabbag/Makefile
config.status: creating src/test_grabbag/cuesheet/Makefile
config.status: creating src/test_grabbag/picture/Makefile
config.status: creating src/test_libs_common/Makefile
config.status: creating src/test_libFLAC/Makefile
config.status: creating src/test_libFLAC++/Makefile
config.status: creating src/test_seeking/Makefile
config.status: creating src/test_streams/Makefile
config.status: creating examples/Makefile
config.status: creating examples/c/Makefile
config.status: creating examples/c/decode/Makefile
config.status: creating examples/c/decode/file/Makefile
config.status: creating examples/c/encode/Makefile
config.status: creating examples/c/encode/file/Makefile
config.status: creating examples/cpp/Makefile
config.status: creating examples/cpp/decode/Makefile
config.status: creating examples/cpp/decode/file/Makefile
config.status: creating examples/cpp/encode/Makefile
config.status: creating examples/cpp/encode/file/Makefile
config.status: creating include/Makefile
config.status: creating include/FLAC/Makefile
config.status: creating include/FLAC++/Makefile
config.status: creating include/share/Makefile
config.status: creating include/share/grabbag/Makefile
config.status: creating include/test_libs_common/Makefile
config.status: creating doc/Makefile
config.status: creating doc/html/Makefile
config.status: creating doc/html/images/Makefile
config.status: creating doc/html/images/hw/Makefile
config.status: creating doc/html/ru/Makefile
config.status: creating m4/Makefile
config.status: creating man/Makefile
config.status: creating test/Makefile
config.status: creating test/cuesheets/Makefile
config.status: creating test/flac-to-flac-metadata-test-files/Makefile
config.status: creating test/metaflac-test-files/Makefile
config.status: creating test/pictures/Makefile
config.status: creating build/Makefile
config.status: creating obj/Makefile
config.status: creating obj/debug/Makefile
config.status: creating obj/debug/bin/Makefile
config.status: creating obj/debug/lib/Makefile
config.status: creating obj/release/Makefile
config.status: creating obj/release/bin/Makefile
config.status: creating obj/release/lib/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

Then...

I don't know how the make command works if my make program is called mingw32-make

Armando@Toshiba /c/flac
$ make
make  all-recursive
make[1]: Entering directory `/c/flac'
Making all in doc
make[2]: Entering directory `/c/flac/doc'
Making all in .
make[3]: Entering directory `/c/flac/doc'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/c/flac/doc'
Making all in html
make[3]: Entering directory `/c/flac/doc/html'
Making all in ru
make[4]: Entering directory `/c/flac/doc/html/ru'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/c/flac/doc/html/ru'
Making all in images
make[4]: Entering directory `/c/flac/doc/html/images'
Making all in hw
make[5]: Entering directory `/c/flac/doc/html/images/hw'
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory `/c/flac/doc/html/images/hw'
make[5]: Entering directory `/c/flac/doc/html/images'
make[5]: Nothing to be done for `all-am'.
make[5]: Leaving directory `/c/flac/doc/html/images'
make[4]: Leaving directory `/c/flac/doc/html/images'
make[4]: Entering directory `/c/flac/doc/html'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory `/c/flac/doc/html'
make[3]: Leaving directory `/c/flac/doc/html'
make[2]: Leaving directory `/c/flac/doc'
Making all in include
make[2]: Entering directory `/c/flac/include'
Making all in FLAC
make[3]: Entering directory `/c/flac/include/FLAC'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/c/flac/include/FLAC'
Making all in FLAC++
make[3]: Entering directory `/c/flac/include/FLAC++'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/c/flac/include/FLAC++'
Making all in share
make[3]: Entering directory `/c/flac/include/share'
Making all in grabbag
make[4]: Entering directory `/c/flac/include/share/grabbag'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/c/flac/include/share/grabbag'
make[4]: Entering directory `/c/flac/include/share'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory `/c/flac/include/share'
make[3]: Leaving directory `/c/flac/include/share'
Making all in test_libs_common
make[3]: Entering directory `/c/flac/include/test_libs_common'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/c/flac/include/test_libs_common'
make[3]: Entering directory `/c/flac/include'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/c/flac/include'
make[2]: Leaving directory `/c/flac/include'
Making all in m4
make[2]: Entering directory `/c/flac/m4'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/c/flac/m4'
Making all in man
make[2]: Entering directory `/c/flac/man'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/c/flac/man'
Making all in src
make[2]: Entering directory `/c/flac/src'
Making all in libFLAC
make[3]: Entering directory `/c/flac/src/libFLAC'
Making all in include
make[4]: Entering directory `/c/flac/src/libFLAC/include'
Making all in private
make[5]: Entering directory `/c/flac/src/libFLAC/include/private'
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory `/c/flac/src/libFLAC/include/private'
Making all in protected
make[5]: Entering directory `/c/flac/src/libFLAC/include/protected'
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory `/c/flac/src/libFLAC/include/protected'
make[5]: Entering directory `/c/flac/src/libFLAC/include'
make[5]: Nothing to be done for `all-am'.
make[5]: Leaving directory `/c/flac/src/libFLAC/include'
make[4]: Leaving directory `/c/flac/src/libFLAC/include'
Making all in .
make[4]: Entering directory `/c/flac/src/libFLAC'
if /bin/sh ../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../..   -DFLaC__INLINE=__inline__ -DNDEBUG -I../.. -I./include -I../../include     -O3 -funroll-loops -finline-functions -Wall -W -Winline -g -O2 -MT stream_decoder.lo -MD -MP -MF ".deps/stream_decoder.Tpo" \
          -c -o stream_decoder.lo `test -f 'stream_decoder.c' || echo './'`stream_decoder.c; \
        then mv -f ".deps/stream_decoder.Tpo" ".deps/stream_decoder.Plo"; \
        else rm -f ".deps/stream_decoder.Tpo"; exit 1; \
        fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../.. -DFLaC__INLINE=__inline__ -DNDEBUG -I../..
-I./include -I../../include -O3 -funroll-loops -finline-functions -Wall -W -Winline -g -O2 -MT stream_decoder.lo -MD -MP -MF .deps/stream_decoder.Tpo -c stream_decoder.c  -DDLL_EXPORT -DPIC -o .libs/stream_decoder.o
In file included from stream_decoder.c:56:0:
../../include/share/alloc.h:41:5: error: #error
In file included from stream_decoder.c:56:0:
../../include/share/alloc.h: In function 'safe_malloc_mul_2op_':
../../include/share/alloc.h:120:13: error: 'SIZE_T_MAX' undeclared (first use in this function)
../../include/share/alloc.h:120:13: note: each undeclared identifier is reported only once for each function it appears in
../../include/share/alloc.h: In function 'safe_malloc_mul_3op_':
../../include/share/alloc.h:130:13: error: 'SIZE_T_MAX' undeclared (first use in this function)
../../include/share/alloc.h: In function 'safe_malloc_mul2add_':
../../include/share/alloc.h:143:13: error: 'SIZE_T_MAX' undeclared (first use in this function)
../../include/share/alloc.h: In function 'safe_realloc_mul_2op_':
../../include/share/alloc.h:196:13: error: 'SIZE_T_MAX' undeclared (first use in this function)
make[4]: *** [stream_decoder.lo] Error 1
make[4]: Leaving directory `/c/flac/src/libFLAC'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/c/flac/src/libFLAC'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/c/flac/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/c/flac'
make: *** [all] Error 2

William Labbett
Member #4,486
March 2004
avatar

No worries.

Find limits.h in your mingw32 (or whatever your equivalent is) include dir

and

add this line :-

#define SIZE_T_MAX UINT_MAX /* max value for a size_t */

to it (limits.h).

It's something to do with newer versions of gcc not having that #define or something.

After that you should get a bit further.

I ran into another problem - can't recall what it was now.

AMCerasoli
Member #11,955
May 2010
avatar

It didn't work William... :(

I modified this one...

{"name":"limits.gif","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/e\/3e8f243da0abbe944aef2d207113e81b.gif","w":939,"h":181,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/e\/3e8f243da0abbe944aef2d207113e81b"}limits.gif

{"name":"here.gif","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/1\/41eca2ccf27e7b5153ea0629f501dc11.gif","w":1052,"h":874,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/1\/41eca2ccf27e7b5153ea0629f501dc11"}here.gif

William Labbett
Member #4,486
March 2004
avatar

I can't see those pictures well.

Here's where I put it :

/* MSVC compatibility */
#define _I64_MIN LONG_LONG_MIN
#define _I64_MAX LONG_LONG_MAX
#define _UI64_MAX ULONG_LONG_MAX

EDIT : I think you put it here so it won't get included if the #ifndef isn't true.


#endif /* Not Strict ANSI and GNU C compiler */

#define SIZE_T_MAX UINT_MAX /* max value for a size_t */

#endif /* not _LIMITS_H_ */

AMCerasoli
Member #11,955
May 2010
avatar

Thanks I finally managed to install:

Zlib
Freetype
Lpng
Physfs
OpenAL
libOGG
libvorbis
Flac
dumb
libjpg

JESUS!!!!!!!!

With lot of errors... let's see if it works...

EDIT: No I was in the wrong limits.h file...

William Labbett
Member #4,486
March 2004
avatar

You got them all installed! Well done.

AMCerasoli
Member #11,955
May 2010
avatar

Awww...

I disable the SHARED option when configuring Allegro to see if I was able to compile the program with static libraries... But doesn't work...

While compile allegro with "SHARE disable" nothing works not even examples... But then I compile it with the SHARED option, and everything works , but again I have to link to the Dlls...

{"name":"shared.gif","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/7\/6742d68fc08eeae8f9f971f9b929cd65.gif","w":1163,"h":846,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/7\/6742d68fc08eeae8f9f971f9b929cd65"}shared.gif

I linked to the SHARED disable files but ask me for the dlls anyway.. what I'm doing wrong?

PS: I am testing the program in other computer that doesn't have anything to do with Allegro...

William Labbett
Member #4,486
March 2004
avatar

Sorry. Don't know.

Start a new thread about it.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

William Labbett
Member #4,486
March 2004
avatar

Not getting errors from nasm but I'm getting a problem at the linking stage. I'm not sure if there's a linker option missing in the makefile or whether it's all there and there's some library I've not got in place. I think it might be libogg.

ia32/fixed_asm.nasm:308: warning: label alone on a line without a colon might be
 in error
nasm -f elf -d OBJ_FORMAT_elf -i ia32/ ia32/lpc_asm.nasm -o ia32/lpc_asm.release
.o
ia32/lpc_asm.nasm:1507: warning: label alone on a line without a colon might be
in error
nasm -f elf -d OBJ_FORMAT_elf -i ia32/ ia32/stream_encoder_asm.nasm -o ia32/stre
am_encoder_asm.release.o
ia32/stream_encoder_asm.nasm:155: warning: label alone on a line without a colon
 might be in error
ar cru ../../obj/release/lib/libFLAC.a bitmath.release.o bitreader.release.o bit
writer.release.o cpu.release.o crc.release.o fixed.release.o float.release.o for
mat.release.o lpc.release.o md5.release.o memory.release.o metadata_iterators.re
lease.o metadata_object.release.o ogg_decoder_aspect.release.o ogg_encoder_aspec
t.release.o ogg_helper.release.o ogg_mapping.release.o stream_decoder.release.o
stream_encoder.release.o stream_encoder_framing.release.o window.release.o   ia3
2/bitreader_asm.release.o ia32/cpu_asm.release.o ia32/fixed_asm.release.o ia32/l
pc_asm.release.o ia32/stream_encoder_asm.release.o  && ranlib ../../obj/release/
lib/libFLAC.a
gcc -shared -o ../../obj/release/lib/libFLAC.so bitmath.release.o bitreader.rele
ase.o bitwriter.release.o cpu.release.o crc.release.o fixed.release.o float.rele
ase.o format.release.o lpc.release.o md5.release.o memory.release.o metadata_ite
rators.release.o metadata_object.release.o ogg_decoder_aspect.release.o ogg_enco
der_aspect.release.o ogg_helper.release.o ogg_mapping.release.o stream_decoder.r
elease.o stream_encoder.release.o stream_encoder_framing.release.o window.releas
e.o   ia32/bitreader_asm.release.o ia32/cpu_asm.release.o ia32/fixed_asm.release
.o ia32/lpc_asm.release.o ia32/stream_encoder_asm.release.o  -L../../obj/release
/lib
Cannot export FLAC__bitreader_read_rice_signed_block_asm_ia32_bswap: symbol not
defined
Cannot export FLAC__cpu_have_cpuid_asm_ia32: symbol not defined
Cannot export FLAC__cpu_info_asm_ia32: symbol not defined
Cannot export FLAC__cpu_info_extended_amd_asm_ia32: symbol not defined
Cannot export FLAC__fixed_compute_best_predictor_asm_ia32_mmx_cmov: symbol not d
efined
Cannot export FLAC__lpc_compute_autocorrelation_asm_ia32: symbol not defined
Cannot export FLAC__lpc_compute_autocorrelation_asm_ia32_3dnow: symbol not defin
ed
Cannot export FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_12: symbol not
defined
Cannot export FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_4: symbol not d
efined
Cannot export FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_8: symbol not d
efined
Cannot export FLAC__lpc_compute_residual_from_qlp_coefficients_asm_ia32: symbol
not defined
Cannot export FLAC__lpc_compute_residual_from_qlp_coefficients_asm_ia32_mmx: sym
bol not defined
Cannot export FLAC__lpc_restore_signal_asm_ia32: symbol not defined
Cannot export FLAC__lpc_restore_signal_asm_ia32_mmx: symbol not defined
Cannot export precompute_partition_info_sums_32bit_asm_ia32_: symbol not defined

bitreader.release.o:bitreader.c:(.text+0x148): undefined reference to `ntohl@4'
bitreader.release.o:bitreader.c:(.text+0x177): undefined reference to `ntohl@4'
bitreader.release.o:bitreader.c:(.text+0x190): undefined reference to `ntohl@4'
bitreader.release.o:bitreader.c:(.text+0x1a7): undefined reference to `ntohl@4'
bitreader.release.o:bitreader.c:(.text+0x1c2): undefined reference to `ntohl@4'
bitreader.release.o:bitreader.c:(.text+0x1d8): more undefined references to `nto
hl@4' follow
cpu.release.o:cpu.c:(.text+0x16): undefined reference to `FLAC__cpu_have_cpuid_a
sm_ia32'
cpu.release.o:cpu.c:(.text+0x88): undefined reference to `FLAC__cpu_info_asm_ia3
2'
cpu.release.o:cpu.c:(.text+0xe9): undefined reference to `FLAC__cpu_info_extende
d_amd_asm_ia32'
ogg_decoder_aspect.release.o:ogg_decoder_aspect.c:(.text+0x16): undefined refere
nce to `ogg_stream_init'
ogg_decoder_aspect.release.o:ogg_decoder_aspect.c:(.text+0x32): undefined refere
nce to `ogg_sync_init'
ogg_decoder_aspect.release.o:ogg_decoder_aspect.c:(.text+0x86): undefined refere
nce to `ogg_sync_clear'
ogg_decoder_aspect.release.o:ogg_decoder_aspect.c:(.text+0xcb): undefined refere
nce to `ogg_stream_reset'
ogg_decoder_aspect.release.o:ogg_decoder_aspect.c:(.text+0xd9): undefined refere
nce to `ogg_sync_reset'
ogg_decoder_aspect.release.o:ogg_decoder_aspect.c:(.text+0x107): undefined refer
ence to `ogg_stream_reset'
ogg_decoder_aspect.release.o:ogg_decoder_aspect.c:(.text+0x115): undefined refer
ence to `ogg_sync_reset'
ogg_decoder_aspect.release.o:ogg_decoder_aspect.c:(.text+0x204): undefined refer
ence to `ogg_sync_pageout'
ogg_decoder_aspect.release.o:ogg_decoder_aspect.c:(.text+0x22f): undefined refer
ence to `ogg_stream_pagein'
ogg_decoder_aspect.release.o:ogg_decoder_aspect.c:(.text+0x288): undefined refer
ence to `ogg_stream_packetout'
ogg_decoder_aspect.release.o:ogg_decoder_aspect.c:(.text+0x346): undefined refer
ence to `ogg_sync_buffer'
ogg_decoder_aspect.release.o:ogg_decoder_aspect.c:(.text+0x38f): undefined refer
ence to `ogg_sync_wrote'
ogg_decoder_aspect.release.o:ogg_decoder_aspect.c:(.text+0x3c0): undefined refer
ence to `ogg_page_serialno'
ogg_decoder_aspect.release.o:ogg_decoder_aspect.c:(.text+0x96): undefined refere
nce to `ogg_stream_clear'
ogg_encoder_aspect.release.o:ogg_encoder_aspect.c:(.text+0x15): undefined refere
nce to `ogg_stream_init'
ogg_encoder_aspect.release.o:ogg_encoder_aspect.c:(.text+0x201): undefined refer
ence to `ogg_stream_packetin'
ogg_encoder_aspect.release.o:ogg_encoder_aspect.c:(.text+0x244): undefined refer
ence to `ogg_stream_pageout'
ogg_encoder_aspect.release.o:ogg_encoder_aspect.c:(.text+0x2f8): undefined refer
ence to `ogg_stream_flush'
ogg_encoder_aspect.release.o:ogg_encoder_aspect.c:(.text+0x60): undefined refere
nce to `ogg_stream_clear'
ogg_helper.release.o:ogg_helper.c:(.text+0x351): undefined reference to `ogg_pag
e_checksum_set'
ogg_helper.release.o:ogg_helper.c:(.text+0x3d8): undefined reference to `ogg_pag
e_checksum_set'
stream_decoder.release.o:stream_decoder.c:(.text+0x4fee): undefined reference to
 `FLAC__bitreader_read_rice_signed_block_asm_ia32_bswap'
stream_decoder.release.o:stream_decoder.c:(.text+0x5003): undefined reference to
 `FLAC__lpc_restore_signal_asm_ia32'
stream_decoder.release.o:stream_decoder.c:(.text+0x500a): undefined reference to
 `FLAC__lpc_restore_signal_asm_ia32_mmx'
stream_decoder.release.o:stream_decoder.c:(.text+0x5011): undefined reference to
 `FLAC__lpc_restore_signal_asm_ia32_mmx'
stream_decoder.release.o:stream_decoder.c:(.text+0x513b): undefined reference to
 `FLAC__lpc_restore_signal_asm_ia32'
stream_decoder.release.o:stream_decoder.c:(.text+0x5142): undefined reference to
 `FLAC__lpc_restore_signal_asm_ia32'
stream_decoder.release.o:stream_decoder.c:(.text+0x5149): undefined reference to
 `FLAC__lpc_restore_signal_asm_ia32'
stream_encoder.release.o:stream_encoder.c:(.text+0xce5): undefined reference to
`precompute_partition_info_sums_32bit_asm_ia32_'
stream_encoder.release.o:stream_encoder.c:(.text+0x48d6): undefined reference to
 `FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_4'
stream_encoder.release.o:stream_encoder.c:(.text+0x48ee): undefined reference to
 `FLAC__lpc_compute_residual_from_qlp_coefficients_asm_ia32'
stream_encoder.release.o:stream_encoder.c:(.text+0x48f8): undefined reference to
 `FLAC__lpc_compute_residual_from_qlp_coefficients_asm_ia32_mmx'
stream_encoder.release.o:stream_encoder.c:(.text+0x490f): undefined reference to
 `FLAC__fixed_compute_best_predictor_asm_ia32_mmx_cmov'
stream_encoder.release.o:stream_encoder.c:(.text+0x4da7): undefined reference to
 `FLAC__lpc_compute_residual_from_qlp_coefficients_asm_ia32'
stream_encoder.release.o:stream_encoder.c:(.text+0x4db1): undefined reference to
 `FLAC__lpc_compute_residual_from_qlp_coefficients_asm_ia32'
stream_encoder.release.o:stream_encoder.c:(.text+0x4dc9): undefined reference to
 `FLAC__lpc_compute_autocorrelation_asm_ia32_3dnow'
stream_encoder.release.o:stream_encoder.c:(.text+0x4e2f): undefined reference to
 `FLAC__lpc_compute_autocorrelation_asm_ia32'
stream_encoder.release.o:stream_encoder.c:(.text+0x4fe5): undefined reference to
 `FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_8'
stream_encoder.release.o:stream_encoder.c:(.text+0x50dd): undefined reference to
 `FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_12'
stream_encoder.release.o:stream_encoder.c:(.text+0x52bf): undefined reference to
 `FLAC__lpc_compute_autocorrelation_asm_ia32'
ia32/bitreader_asm.release.o: In function `FLAC__bitreader_read_rice_signed_bloc
k_asm_ia32_bswap.c1_loop':
ia32/bitreader_asm.nasm:(.text+0x80): undefined reference to `FLAC__crc16_table'

ia32/bitreader_asm.release.o: In function `FLAC__bitreader_read_rice_signed_bloc
k_asm_ia32_bswap.c1_next2':
ia32/bitreader_asm.nasm:(.text+0x10b): undefined reference to `FLAC__crc16_table
'
ia32/bitreader_asm.release.o: In function `FLAC__bitreader_read_rice_signed_bloc
k_asm_ia32_bswap.read1':
ia32/bitreader_asm.nasm:(.text+0x1a4): undefined reference to `bitreader_read_fr
om_client_'
ia32/bitreader_asm.release.o: In function `FLAC__bitreader_read_rice_signed_bloc
k_asm_ia32_bswap.read2':
ia32/bitreader_asm.nasm:(.text+0x1f1): undefined reference to `bitreader_read_fr
om_client_'
ia32/bitreader_asm.release.o: In function `FLAC__bitreader_read_rice_signed_bloc
k_asm_ia32_bswap.c2_next4':
ia32/bitreader_asm.nasm:(.text+0x25d): undefined reference to `FLAC__crc16_table
'
collect2: ld returned 1 exit status
mingw32-make[2]: *** [../../obj/release/lib/libFLAC.so] Error 1
mingw32-make[2]: Leaving directory `C:/flac/src/libFLAC'
mingw32-make[1]: *** [libFLAC] Error 2
mingw32-make[1]: Leaving directory `C:/flac/src'
mingw32-make: *** [src] Error 2

C:\flac>

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

AMCerasoli
Member #11,955
May 2010
avatar

Hey William, it gave me the same errors.

But are you using the MinGW Shell??

Because even when it give me those errors its seems that it's compiling.

If you use the Mingw Shell should be in the "local" folder

I type ./configure
make
make install

And in this directory (C:\MinGW\msys\1.0\local) appear the files that I attached, which then I copy to the Mingw directory and detects flac...

I don't know if this can help...

William Labbett
Member #4,486
March 2004
avatar

I did :) Thanks.

With MSYS it compiled with only one error which was easy to fix.

When I run CMake with the allegro CMakeLists file though, it says that dynamic loading of libFLAC will be disabled because a static library was found.

The example ex_acodec doesn't work. Perhaps it's because it needs the dll ?

AMCerasoli
Member #11,955
May 2010
avatar

I also have the same problem :'(

ex_acodec_multi, ex_audio_props, ex_audio_simple doens't work. the rest does..

and I get this from Cmake


Performing Test SUPPORT_GDIPLUS
Performing Test SUPPORT_GDIPLUS - Success
Found DSOUND: C:/MinGW/include 
Found OpenAL: C:/MinGW/lib/libOpenAL32.dll.a 
Found FLAC: C:/MinGW/include 
Performing Test FLAC_COMPILES
Performing Test FLAC_COMPILES - Success

WARNING: Dynamic loading will be disabled for FLAC as static library was found:

C:/MinGW/lib/libFLAC.a
Found DUMB: C:/MinGW/include 
Performing Test DUMB_COMPILES
Performing Test DUMB_COMPILES - Success

WARNING: Dynamic loading will be disabled for DUMB as static library was found:

C:/MinGW/lib/libdumb.a
Found VORBIS: C:/MinGW/include 
Performing Test VORBIS_COMPILES
Performing Test VORBIS_COMPILES - Success
DLL name for C:/MinGW/lib/libvorbisfile.dll.a: libvorbisfile-3.dll
Found Freetype: C:/MinGW/lib/libfreetype.dll.a 
Found ZLIB: C:/MinGW/include (found version "1.2.5")
Found PhysFS: C:/MinGW/lib/libphysfs.dll.a 
Found PHYSFS: C:/MinGW/lib/libphysfs.dll.a 
Performing Test PHYSFS_IMPLICIT_ZLIB
Performing Test PHYSFS_IMPLICIT_ZLIB - Success
Configuring done

William Labbett
Member #4,486
March 2004
avatar

I just tried something in case it works :

I changed libFLAC.a to libFLAC.dll.a (ie changed the name of the file) and CMake doesn't give that warning so maybe it'll be ok now. I'm recompiling and we'll see if it works.

EDIT : no, still get the same problems.

AMCerasoli
Member #11,955
May 2010
avatar

There is also liballegro-5.0.0-RC4-monolith-static-mt.a I found it in the Allegro Pre-compiled binaries...

Manual said:

The monolith version is a one-size-fits-all build of Allegro. When you link against allegro-monolith, you do not need to link to any other Allegro library. (And so there is no such thing as allegro_module-monolith.) The monolith build can also be static; if so, the same things mentioned above regarding the static build apply to it.

I'm trying to compile it statically I'm putting #define ALLEGRO_STATICLINK before all

#SelectExpand
1 #define ALLEGRO_STATICLINK 2#include "allegro5/allegro.h" 3#include "allegro5/allegro_font.h" 4#include "allegro5/allegro_ttf.h" 5#include "allegro5/allegro_image.h" 6#include <allegro5/allegro_primitives.h>

Assume you're using MinGW GCC 4.5.0. To compile Allegro as static library with static run-time libraries use following switches:

Switches for source files:
-s -DALLEGRO_SRC -DALLEGRO_STATICLINK -DALLEGRO_LIB_BUILD

Switches for linker:
-lgcc_eh -static-libgcc -static-libstdc++
Switches for executable:

Switches for source files:
-s -DALLEGRO_STATICLINK

Switches for linker:
-lgcc_eh -static-libgcc -static-libstdc++

Libraries:

Allegro and add-ons (list all your application, you may list all they will be ignored if not used):
allegro-5.1.0-static-mt
allegro_audio-5.1.0-static-mt
...

Direct dependencies (libraries used by Allegro):
libFLAC-1.2.1-static-mt
libvorbisfile-1.2.3-static-mt
libvorbis-1.2.3-static-mt
libogg-1.1.4-static-mt
dumb-0.9.3-static-mt
zlib-1.2.5-static-mt
physfs-2.0.0-static-mt
freetype-2.4.2-static-mt

Indirect dependencies (DLL's availabe in system):
gdiplus
uuid
kernel32
winmm
psapi
opengl32
glu32
user32
comdlg32
gdi32
shell32
ole32
advapi32
ws2_32

But I can't understand what he is saying... and you?

EDIT: There is also this recently created manual... but it's for Microsoft Visual Studio 2008... http://wiki.allegro.cc/index.php?title=Configuring_Microsoft_Visual_Studio_2008_For_Allegro_5.0.0
But talks about static linking....

But I still don't get it...

 1   2 


Go to: