#251 Make command Fails on Ubuntu Linux

open
nobody
None
5
2010-11-06
2010-11-06
Charlie
No

After compiling when attempting to run the make command the following occurs in the Terminal:

Making all in m4
make[1]: Entering directory `/home/charlie/VBA-1.7.2/m4'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/charlie/VBA-1.7.2/m4'
Making all in src
make[1]: Entering directory `/home/charlie/VBA-1.7.2/src'
Making all in gb
make[2]: Entering directory `/home/charlie/VBA-1.7.2/src/gb'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/charlie/VBA-1.7.2/src/gb'
Making all in prof
make[2]: Entering directory `/home/charlie/VBA-1.7.2/src/prof'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/charlie/VBA-1.7.2/src/prof'
Making all in i386
make[2]: Entering directory `/home/charlie/VBA-1.7.2/src/i386'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/charlie/VBA-1.7.2/src/i386'
Making all in sdl
make[2]: Entering directory `/home/charlie/VBA-1.7.2/src/sdl'
if g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"VisualBoyAdvance\" -DVERSION=\"1.7.2\" -DHAVE_LIBZ=1 -DHAVE_LIBPNG=1 -DHAVE_LIBPTHREAD=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MALLOC_H=1 -DHAVE_STRINGS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_NETINET_IN_H=1 -I. -I. -I../../src -DSDL -DSYSCONFDIR=\"/usr/local/etc\" -fno-exceptions -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -DPROFILING -DMMX -DDEV_VERSION -MT GBA.o -MD -MP -MF ".deps/GBA.Tpo" \ -c -o GBA.o `test -f '../GBA.cpp' || echo './'`../GBA.cpp; \ then mv -f ".deps/GBA.Tpo" ".deps/GBA.Po"; \ else rm -f ".deps/GBA.Tpo"; exit 1; \ fi
../GBA.cpp: In function ‘bool CPUWriteMemState(char*, int)’:
../GBA.cpp:677: warning: deprecated conversion from string constant to ‘char*’
../GBA.cpp: In function ‘bool CPUReadMemState(char*, int)’:
../GBA.cpp:820: warning: deprecated conversion from string constant to ‘char*’
../GBA.cpp: In function ‘bool CPUReadGSASnapshot(const char*)’:
../GBA.cpp:931: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result
../GBA.cpp:934: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result
../GBA.cpp:936: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result
../GBA.cpp:938: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result
../GBA.cpp:941: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result
../GBA.cpp:945: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result
../GBA.cpp: In function ‘bool CPUIsZipFile(const char*)’:
../GBA.cpp:1133: error: invalid conversion from ‘const char*’ to ‘char*’
../GBA.cpp: In function ‘bool CPUIsGBAImage(const char*)’:
../GBA.cpp:1148: error: invalid conversion from ‘const char*’ to ‘char*’
../GBA.cpp: In function ‘bool CPUIsGBABios(const char*)’:
../GBA.cpp:1172: error: invalid conversion from ‘const char*’ to ‘char*’
../GBA.cpp: In function ‘bool CPUIsELF(const char*)’:
../GBA.cpp:1192: error: invalid conversion from ‘const char*’ to ‘char*’
make[2]: *** [GBA.o] Error 1
make[2]: Leaving directory `/home/charlie/VBA-1.7.2/src/sdl'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/charlie/VBA-1.7.2/src'
make: *** [all-recursive] Error 1

What exactly am I doing wrong?

Discussion

  • Thunor
    Thunor
    2011-03-07

    @Charlie: I've just come upon this error myself compiling on Puppy Linux 5.2 and you need to append "const" to the erroneous lines: "char * p = strrchr(file,'.');" should be "const char * p = strrchr(file,'.');". Once you've done that run make again and you'll get more of the same in Util.cpp. Fix those, run make and it'll compile :)

     
  • nobody cares

     
  • Jonathan
    Jonathan
    2011-10-01

    I had the same problem and I did what you said, but now it comes up with the error

    ../Util.cpp: In function ‘bool utilWritePNGFile(const char*, int, int, u8*)’:
    ../Util.cpp:82:6: error: invalid use of incomplete type ‘struct png_struct’
    /usr/local/include/png.h:822:16: error: forward declaration of ‘struct png_struct’
    make[2]: *** [Util.o] Error 1
    make[2]: Leaving directory `/home/twins-dx/Desktop/VisualBoyAdvance-1.7.2/src/sdl'

    What should I do to fix this problem?