Unable to build 1.9.0 source on Linux

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
andy_blah
Posts: 35
Joined: Thu Sep 07, 2006 7:44 am

Unable to build 1.9.0 source on Linux

Post by andy_blah »

I'm using a 64-bit Debian Unstable, and got the source code from here: https://www.scummvm.org/frs/scummvm/1.9 ... 9.0.tar.xz

It doesn't want to make at all, gives me this error:

Code: Select all

$ make
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
    C++      backends/platform/sdl/sdl.o
In file included from ./backends/platform/sdl/sdl.h:26:0,
                 from backends/platform/sdl/sdl.cpp:31:
./backends/platform/sdl/sdl-sys.h:151:17: fatal error: SDL.h: No such file or directory
 #include <SDL.h>
                 ^
compilation terminated.

So I assumed, since the actual file is name without any capital letters, I'd rename that file so that it matches what the sdl.cpp file expects, but I now get this:

Code: Select all

$ make
fatal&#58; Not a git repository &#40;or any parent up to mount point /home&#41;
Stopping at filesystem boundary &#40;GIT_DISCOVERY_ACROSS_FILESYSTEM not set&#41;.
    C++      backends/platform/sdl/sdl.o
backends/platform/sdl/sdl.cpp&#58;31&#58;39&#58; fatal error&#58; backends/platform/sdl/sdl.h&#58; No such file or directory
 #include "backends/platform/sdl/sdl.h"
                                       ^
compilation terminated.
Makefile.common&#58;103&#58; recipe for target 'backends/platform/sdl/sdl.o' failed
make&#58; *** &#91;backends/platform/sdl/sdl.o&#93; Error 1
Leaving both "sdl.h" and "SDL.h" in the same folder still gives me the same error as just having "sdl.h"

Does anyone know what I can do to fix this issue?
Thanks in advance!
User avatar
tsoliman
ScummVM Developer
Posts: 404
Joined: Wed Jan 19, 2011 3:47 pm
Location: USA

Post by tsoliman »

Is libsdl-dev (or even better: libsdl2-dev) installed?

Install it, revert your changes and then rerun configure and make.
andy_blah
Posts: 35
Joined: Thu Sep 07, 2006 7:44 am

Post by andy_blah »

Both libsdl1.2-dev and libsdl2-dev are installed.

Code: Select all

$ apt policy libsdl1.2-dev
libsdl1.2-dev&#58;
  Installed&#58; 1.2.15+dfsg1-4
  Candidate&#58; 1.2.15+dfsg1-4
  Version table&#58;
     1.2.15+dfsg1-4 500
        500 http&#58;//debian.mirror.linux.com unstable/main amd64 Packages
        100 /var/lib/dpkg/status

$ apt policy libsdl2-dev
libsdl2-dev&#58;
  Installed&#58; 2.0.5+dfsg1-1
  Candidate&#58; 2.0.5+dfsg1-1
  Version table&#58;
 *** 2.0.5+dfsg1-1 500
        500 http&#58;//debian.mirror.linux.com unstable/main amd64 Packages
        100 /var/lib/dpkg/status

Though, I thought this is an issue with the source files...?
User avatar
tsoliman
ScummVM Developer
Posts: 404
Joined: Wed Jan 19, 2011 3:47 pm
Location: USA

Post by tsoliman »

Oh I think I see why you would think so. I am not a C++ guru but I think the following is correct:

#include <foo.h> means look in INCLUDE directories (which configure would set up)
#include "foo.h" looks at the current directory

(So for SDL2 for example <SDL.h> is actually /usr/include/SDL2/SDL.h)

This why I thought sdl was not installed or that configure couldn't find it.

My sid laptop is still broken, so I'm gonna set up a sid VM later and look at this. In the meantime, can you pastebin (or similar) the output of configure along with the contents of config.log and config.mk?

(Don't paste the raw text in the forum. Use pastebin.com or similar and post the link)
andy_blah
Posts: 35
Joined: Thu Sep 07, 2006 7:44 am

Post by andy_blah »

tsoliman wrote:In the meantime, can you pastebin (or similar) the output of configure along with the contents of config.log and config.mk?
Of course:
config.log - http://hastebin.com/kotozihemo
config.mk - http://hastebin.com/idokejulav
tsoliman wrote:(Don't paste the raw text in the forum. Use pastebin.com or similar and post the link)
Obviously! Haha :P
andy_blah
Posts: 35
Joined: Thu Sep 07, 2006 7:44 am

Post by andy_blah »

I just realised what the problem was. I've set '--prefix=$HOME' and the fool was looking for SDL's include files in the home folder. It's weird as how configure uses the same prefix for installing and for SDL's files. Luckly the other dependencies' paths seem unaffected. So I ended up adding '--with-sdl-prefix=/usr', and now it compiled as expected.
User avatar
tsoliman
ScummVM Developer
Posts: 404
Joined: Wed Jan 19, 2011 3:47 pm
Location: USA

Post by tsoliman »

Just curious, why do --prefix=$HOME?

Are you going to do a make install or something?
andy_blah
Posts: 35
Joined: Thu Sep 07, 2006 7:44 am

Post by andy_blah »

Yes, I prefer to have some of my executables in the home folder, to avoid losing them in case I change the distro, or I have to reinstall the OS.
Post Reply