Author Topic: Ubuntu fail to build 0.9.13  (Read 2176 times)

Bladeforce

  • Newbie
  • *
  • Posts: 6
    • View Profile
Ubuntu fail to build 0.9.13
« on: December 19, 2013, 12:34:33 PM »
Hi, I am compiling yabause on Ubuntu x64 13.10

I get the following error

[ 10%] Building C object CMakeFiles/yabause.dir/memory.o
/media/Downloads/yabause/src/memory.c: In function ‘MappedMemoryLoad’:
/media/Downloads/yabause/src/memory.c:860:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
    fread((void *)buffer, 1, filesize, fp);
         ^
[ 11%] Building C object CMakeFiles/yabause.dir/movie.o
/media/Downloads/yabause/src/movie.c: In function ‘WriteHeader’:
/media/Downloads/yabause/src/movie.c:60:16: error: expected expression before ‘,’ token
  fwrite(VERSION, sizeof(VERSION), 1, fp);
                ^
/media/Downloads/yabause/src/movie.c: In function ‘DoMovie’:
/media/Downloads/yabause/src/movie.c:154:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
    fread(&PORTDATA1.data
  • , 1, 1, Movie.fp);

         ^
/media/Downloads/yabause/src/movie.c:157:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
    fread(&PORTDATA2.data
  • , 1, 1, Movie.fp);

         ^
/media/Downloads/yabause/src/movie.c: In function ‘ReadHeader’:
/media/Downloads/yabause/src/movie.c:48:7: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
  fread(&Movie.Rerecords, sizeof(Movie.Rerecords), 1, fp);
       ^
/media/Downloads/yabause/src/movie.c: In function ‘ReadMovieInState’:
/media/Downloads/yabause/src/movie.c:375:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&tempbuffer.size, 4, 1, fp);//size
        ^
/media/Downloads/yabause/src/movie.c:380:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
   fread(tempbuffer.data, 1, tempbuffer.size, fp);//movie
        ^
/media/Downloads/yabause/src/movie.c: In function ‘ReadMovieIntoABuffer’:
/media/Downloads/yabause/src/movie.c:403:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
  fread (tempbuffer.data, 1, tempbuffer.size, fp);
        ^
make[2]: *** [CMakeFiles/yabause.dir/movie.o] Error 1
make[1]: *** [CMakeFiles/yabause.dir/all] Error 2
make: *** [all] Error 2


Any help please?
« Last Edit: December 19, 2013, 07:18:11 PM by Bladeforce »

Guillaume

  • Administrator
  • Sr. Member
  • *****
  • Posts: 359
    • View Profile
    • ./confiture && cake
Re: Ubuntu fail to build 0.9.13
« Reply #1 on: December 19, 2013, 11:41:46 PM »
You're running CMake with the wrong source directory: it must be the top level directory and not "src"

(if you're doing an in-source build, go in the top directory, not "src", and run "cmake .")

I will end up adding some system to detect this specific error :)


Bladeforce

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Ubuntu fail to build 0.9.13
« Reply #2 on: December 20, 2013, 08:55:49 PM »
Thanks, that worked a treat :)

petros

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Ubuntu fail to build 0.9.13
« Reply #3 on: January 05, 2015, 05:27:37 PM »
Bumping the thread because I have a similar issue.

I run Ubuntu 14.04 X64 version and try to compile from 0.9.14 source

I create a /build folder and run cmake ..
During compilation progress with make command, I get the following error:

[ 27%] Building ASM-ATT object src/CMakeFiles/yabause.dir/sh2_dynarec/linkage_x64.s.o
[ 28%] Building C object src/CMakeFiles/yabause.dir/c68k/c68kexec.c.o
[ 28%] Building C object src/CMakeFiles/yabause.dir/c68k/c68k.c.o
[ 29%] Building C object src/CMakeFiles/yabause.dir/m68kc68k.c.o
[ 29%] Building C object src/CMakeFiles/yabause.dir/sock-linux.c.o
[ 30%] Building C object src/CMakeFiles/yabause.dir/thr-linux.c.o
[ 30%] Building C object src/CMakeFiles/yabause.dir/cd-linux.c.o
[ 31%] Building C object src/CMakeFiles/yabause.dir/perlinuxjoy.c.o
Linking C static library libyabause.a
[ 31%] Built target yabause
[ 32%] Generating moc_YabauseThread.cxx
moc: Cannot open options file specified with @
Usage: moc [options] <header-file>
  -o<file>           write output to file rather than stdout
  -I<dir>            add dir to the include path for header files
  -E                 preprocess only; do not generate meta object code
  -D<macro>[=<def>]  define macro, with optional definition
  -U<macro>          undefine macro
  -i                 do not generate an #include statement
  -p<path>           path prefix for included file
  -f[<file>]         force #include, optional file name
  -nn                do not display notes
  -nw                do not display warnings
  @<file>            read additional options from file
  -v                 display version of moc
make[2]: *** [src/qt/moc_YabauseThread.cxx] Error 1
make[1]: *** [src/qt/CMakeFiles/yabause-qt.dir/all] Error 2
make: *** [all] Error 2

Janilow

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Событие
Ubuntu fail to build 0 9 13
« Reply #4 on: February 26, 2017, 10:16:38 AM »
Try running:

sudo apt-get install build-essential cmake libbluetooth-dev
libcurl4-gnutls-dev libfreetype6-dev libfribidi-dev libgl1-mesa-dev
libjpeg-dev libogg-dev libopenal-dev libpng-dev libvorbis-dev libxrandr-dev
mesa-common-dev pkg-config zlib1g-dev

This will make sure you have all that is needed.