Results 1 to 11 of 11
Like Tree1Likes
  • 1 Post By grazzt
  1.    #1  
    Hey development peeps. I'm the author of the new WebOS port of ScummVM (My postcount is apparently too low for links, so copy/paste if interested: http://forums.scummvm.org/viewtopic.php?t=10806). While the port's made some really excellent progress to this point, there's one feature I had to drop: FLAC audio support. For the life of me, I cannot get this library to compile.

    Here's the error I'm hitting:
    Code:
    if arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I. -I../..   -DFLaC__INLINE=__inline__ -DNDEBUG -I../.. -I./include -I../../include  -I/opt/PalmPDK/device/usr/include -O3 -funroll-loops -finline-functions -Wall -W -Winline -mcpu=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp -MT encode.o -MD -MP -MF ".deps/encode.Tpo" \
    	  -c -o encode.o `test -f 'encode.c' || echo './'`encode.c; \
    	then mv -f ".deps/encode.Tpo" ".deps/encode.Po"; \
    	else rm -f ".deps/encode.Tpo"; exit 1; \
    	fi
    encode.c: In function ‘flac__encode_aif’:
    encode.c:607: internal compiler error: Segmentation fault
    A segfault. A segfault in the frickin compiler. That's on Ubuntu-- here we are on OS X Lion:
    Code:
    if arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I. -I../..   -DFLaC__INLINE=__inline__ -DNDEBUG -I../.. -I./include -I../../include   -O3 -funroll-loops -finline-functions -Wall -W -Winline -mcpu=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp -MT encode.o -MD -MP -MF ".deps/encode.Tpo" \
    	  -c -o encode.o `test -f 'encode.c' || echo './'`encode.c; \
    	then mv -f ".deps/encode.Tpo" ".deps/encode.Po"; \
    	else rm -f ".deps/encode.Tpo"; exit 1; \
    	fi
    encode.c: In function ‘flac__encode_aif’:
    encode.c:607: internal compiler error: Bus error: 10
    Are you freaking kidding me!? Here's my ./configure line:
    Code:
    ./configure --host=arm-none-linux-gnueabi --prefix=/opt/PalmPDK/device/usr --disable-shared --disable-largefile --disable-thorough-tests --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs --disable-rpath --disable-ogg --disable-oggtest CFLAGS="-mcpu=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp"
    This happens with both 1.2.0 and 1.2.1 from here: http://sourceforge.net/projects/flac/files/flac-src/

    And I'll be honest, all I'm really doing is following the lead of the instructions here: http://wiki.scummvm.org/index.php/Compiling_ScummVM/WebOS

    Anyone have any tips? Or hell, I'm desperate enough -- if you've ever gotten this to successfully compile, can I have your binaries?
  2. #2  
    Are you trying to build libflac or scumm with flac support? I have compiled libflac many times, although I prefer to just build it into my code.

    Edit: Try -mcpu=cortex-a8

    That is what I use.

    Also, do you need a --target-os=linux or are you compiling in linux?

    Second edit: Never mind on the target, just realized you are compiling from linux. I have only ever cross-compiled it.
  3. #3  
    what is FLAC for ARM, what does it do, sorry no help just trying to bump the thread up in the hope someone sees it and helps you
    If this helped you hit thanks.
  4. #4  
    It's a container class for lossless sound files, like mp3, but with better sound. Also, I am one of the main developers working on porting sound libraries to webOS, so no need to bump, he just needs to respond so I can get more info.
  5.    #5  
    No joy on the different CPU flag, I'm afraid -- same error in the same place on 1.2.0 and 1.2.1. My arm-gcc is 4.3.1. And yep, this is just the flac library-- Scumm's been compiling fine, but I can't get flac in it until flac itself compiles
  6. #6  
    Is it an option to incorporate the src directly into the project. That is the option I have had the most luck with. In fact, its my preferred way for incorporating all the sound libraries except FFmpeg, which is just way too complicated to incorporate. The FLAC library src is really well written and user friendly. I would be more than happy to try incorporating if you want.

    Have you done a make clean and then tried it? The seg fault error is so unusual that it strikes me there is something else going on, like some bad files somewhere.
  7. #7  
    compiles for me with CC='gcc -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp' (with all the same ./configure flags as you)

    with gcc version:

    Thread model: posix
    gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203)

    file flac
    flac: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.14, not stripped

    I can tar the whole dir up if you want it?
    nyuepik likes this.
  8.    #8  
    I'm not sure that's a viable option-- my port is really just a new backend in an already established codebase. Integrating Flac in the source would be a change that the ScummVM team wouldn't be able to support/accept. It's not a mission-critical lib, so if it comes down to it, I'd rather just drop support.

    Although, you mention you've cross-compiled flac. Do you have the binaries/headers available from the PDK folder? That might eliminate the need for any of this :-).

    I've tried everything, though. Make clean, two separate versions, both versions on separate oses, different config flags... I just don't understand how a single function can manage to crash two different compilers on two different oses.
  9.    #9  
    Quote Originally Posted by grazzt View Post
    compiles for me with CC='gcc -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp' (with all the same ./configure flags as you)

    with gcc version:

    Thread model: posix
    gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203)
    Nice! I'll give that a shot when I get home tonight.
  10. #10  
    Let me know if you don't have luck and I will cross-compile for you, although sounds like grazzt has you covered.
  11.    #11  
    No love on the CC string -- I couldn't even finish the ./configure:
    Code:
    checking for arm-none-linux-gnueabi-gcc... gcc -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
    checking for C compiler default output file name... configure: error: C compiler cannot create executables
    But I got in touch with kayahr, the fine gentleman who put together the first WebOS port, and he confirmed that the latest official arm-none-linux-gnueabi-gcc from Palm/HP is causing the issue, and that it can be resolved by removing a layer of optimization (by adding -O1 to the CFLAGS). So many props to him and all of you for helping . Flac compiled great!

Posting Permissions