Compiling problem


Problems running or configuring the software, commands & options, compiling, different platforms, using the interface, documentation, etc.

Temple Termagant

Posts: 10

Joined: Saturday, 24th September 2011, 17:18

Post Sunday, 25th September 2011, 01:14

Compiling problem

I'm trying to build soup for my distro, but fail miserably.
After reading the documentation I have installed these packages(I enclose a chart for easy view, red parts is interesting dependence): Image
After I have retrieved these packages I tried to give this command, but I received an error:
  Code:
tc@box:~/stone_soup-0.9.1/source$ make TILES=y prefix=/usr/local DATADIR=share/c
rawl SAVEDIR=~/.crawl
* rebuilding crawl: new build flags or prefix
make: * contrib: No such file or directory. Stop.
make: * [.contrib-libs] Error 2
tc@box:~/stone_soup-0.9.1/source$

I get the same error using only the make command

I have not given up and tried to install other interesting dependencies (in yellow background): Image but i get again the same error.

I think it can be for a library that the compiler can not find where it would, In this prospectus I leave you the complete list of my filesystem: http://sprunge.us/bUfV.

If all goes well I intend to package the game for the distro I use.

P.s. I looked at the makefile with regard to the sound activation, this provides an example with the command "play"; but I do not possess that command, would know some of you write the string to use "aplay"?

Thanks :)
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Sunday, 25th September 2011, 10:56

Re: Compiling problem

looks like you forgot to pull the submodules. Go to the topmost directory (the one with crawl-ref in it) and type:

  Code:
git submodule update --init
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

Temple Termagant

Posts: 10

Joined: Saturday, 24th September 2011, 17:18

Post Sunday, 25th September 2011, 12:30

Re: Compiling problem

  Code:
tc@box:~/stone_soup-0.9.1$ git submodule update --init
fatal: Not a git repository (or any of the parent directories): .git
tc@box:~/stone_soup-0.9.1$


I forgot to say I download tarball no deps version : http://sourceforge.net/projects/crawl-r ... 2/download
I didn't use git :P


edit: contrib is a source directory with static linked dependencies? but I want to create a version with dynamic dependencies, otherwise how do I create a package for distro's repositories?
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Sunday, 25th September 2011, 18:27

Re: Compiling problem

No, even if you have contrib it won't make a static executable, unless you ask it to. In theory, you shouldn't need contrib if you already have all the dependencies installed, but I think it doesn't really work for some reason. So try the other source file with the dependencies, or use git. You can try asking for help on ##crawl-dev too.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

Temple Termagant

Posts: 10

Joined: Saturday, 24th September 2011, 17:18

Post Sunday, 25th September 2011, 20:47

Re: Compiling problem

I made ​​further tests but I have had negative results:

nodeps tarball with -i option http://sprunge.us/fZhj
tarbal with deps, delete ./source/contrib/ directory http://sprunge.us/hiXe
tarbal with deps http://sprunge.us/hXNe
tarbal with deps, with -i option http://sprunge.us/MOGN

one my friend has the same problem with slackware! He assumed it is the fault of the makefile, but I understand little about such argouments.

##crawl-dev is a irc chan?

Temple Termagant

Posts: 10

Joined: Saturday, 24th September 2011, 17:18

Post Monday, 26th September 2011, 02:30

Re: Compiling problem

with the help of kilobyte I have made ​​some progress but are still blocked.
First i made a mod in makefile of nodeps tarball adding adding the following central string:
  Code:
ifneq (,$(CONTRIBS))
     echo Needed contribs: $(CONTRIBS)
     +@$(MAKE) -C contrib $(CONTRIBS) ARCH=$(ARCH)


I add these two options to make to allow the discovery of relevant libraries
  Code:
make LUA_INCLUDE_DIR=/usr/local/include/ SQLITE_INCLUDE_DIR=/usr/local/include/ TILES=y prefix=/usr/local DATADIR=share/crawl SAVEDIR=~/.crawl


but it returns this error
  Code:
...
/usr/local/bin/ld: cannot find -llua5.1
collect2: ld returned 1 exit status
make: *** [crawl] Error 1
tc@box:~/stone_soup-0.9.1/source$


I do not know where to find this llua5.1 library, I ask in the forum of the distro.

Stay tuned, I hope to be able to create this package.
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Monday, 26th September 2011, 08:24

Re: Compiling problem

helmen wrote:I made ​​further tests but I have had negative results:

nodeps tarball with -i option http://sprunge.us/fZhj
tarbal with deps, delete ./source/contrib/ directory http://sprunge.us/hiXe
tarbal with deps http://sprunge.us/hXNe
tarbal with deps, with -i option http://sprunge.us/MOGN

The first 2 attempts attempt static linking and fails to find the static libraries in contrib. The last 2 use dynamic linking but fail to find the openGL library (libGL.so) on your system. What's your distro?
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

Temple Termagant

Posts: 10

Joined: Saturday, 24th September 2011, 17:18

Post Tuesday, 27th September 2011, 06:13

Re: Compiling problem

I use tinycore, but i think the problem is the makefile not the distro :(
As you can see by looking at the list of my filesystem in the first topic, I also possess GL
  Code:
./usr/local/include/GL


Unfortunately I think you don't have to look compilations including the -i(ignore) option

Actually i try to create a copy of library in my filesystem and mod makefile, if you watch this post can you see more specific information: http://forum.tinycorelinux.net/index.ph ... 500.0.html

galehar I thank you for the help you are giving me, even if I feel the need to receive help from those who produce those sources, I begin to have a premonition that I will not be able to compile the game :(
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Tuesday, 27th September 2011, 08:04

Re: Compiling problem

helmen wrote:As you can see by looking at the list of my filesystem in the first topic, I also possess GL
  Code:
./usr/local/include/GL

Those are the includes and they are installed in a non-standard directory. The linking fails to find the library (libGL.so). Do you have this file? If it's in /usr/local/lib, try typing
  Code:
export CFLAGS=-L/usr/local/lib

before compiling.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

Temple Termagant

Posts: 10

Joined: Saturday, 24th September 2011, 17:18

Post Wednesday, 28th September 2011, 07:39

Re: Compiling problem

I tried but it seems that nothing happens:
http://sprunge.us/LPMU
If i launch export from sudo i receive "sudo: export: command not found"

I also ask on the other side

To include GL libs I can work on the makefile rather than on the system?
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Wednesday, 28th September 2011, 08:02

Re: Compiling problem

Sorry, it's not CFLAGS it's LDFLAGS to pass options to the linker:
  Code:
export LDFLAGS=-L/usr/local/lib

Also, make sure you do have libGL.so in /usr/local/lib, or this is useless. Don't bother with sudo, it's not needed. This command line is just to configure an environment variable in your shell.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

Temple Termagant

Posts: 10

Joined: Saturday, 24th September 2011, 17:18

Post Wednesday, 28th September 2011, 14:20

Re: Compiling problem

Recap: install the packages that I need
  Code:
tce-load i compiletc liblua libpng-dev libxft-dev lua-dev ncursesw-dev pcre-dev SDL-dev sqlite3-dev perl5
(yes, well it seems that we need perl5, then I will communicate to developers)

After unpack nodeeps tarball i mod ./source/makefile with add " echo Needed contribs: $(CONTRIBS)" before "+@$(MAKE) -C contrib $(CONTRIBS) ARCH=$(ARCH)"
and replace all "lua5.1" with "lua"

Launch this command "export LDFLAGS=-L/usr/local/lib" and before
"make LUA_INCLUDE_DIR=/usr/local/include/ SQLITE_INCLUDE_DIR=/usr/local/include/ TILES=y prefix=/usr/local DATADIR=share/crawl SAVEDIR=~/.crawl"

http://sprunge.us/bKHR

forgive me but I think export it's an command of bash and i have only ash (to build i use only basic environments)

If i use export, the bin I have create will also work on machines that have not made the exports? would not be better to change the makefile or use options such as LUA_INCLUDE_DIR and SQLITE_INCLUDE_DIR?
Last edited by helmen on Wednesday, 28th September 2011, 22:31, edited 1 time in total.
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Wednesday, 28th September 2011, 14:56

Re: Compiling problem

indeed, export is a bash command, I just assumed you used it. I don't know ash. Anyway, you need to configure the LDFLAGS environment variable to -L/usr/local/lib. But first, you need to make sure that your distro supports openGL, or you're just wasting your time. Have you searched your system for libGL.so? Is it in /usr/local/lib? I don't know much about the tinycore distro, but it may not be able to run openGL games. If it can't, and you can't or won't change distro, playing in console is an alternative.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

For this message the author galehar has received thanks:
helmen

Temple Termagant

Posts: 10

Joined: Saturday, 24th September 2011, 17:18

Post Wednesday, 28th September 2011, 15:20

Re: Compiling problem

./usr/local/lib/libGL.so.1.2
./usr/local/lib/libGL.so.1
./usr/local/lib/libGL.so

:P

Opengl game run with correct sistem and package :)

Temple Termagant

Posts: 10

Joined: Saturday, 24th September 2011, 17:18

Post Thursday, 29th September 2011, 00:10

Re: Compiling problem

Ok in tinycore forum I was advised to install the entire Xorg in addition to the header and this work! http://sprunge.us/OWcL , but for absurd This will not install!!! http://sprunge.us/LQSX

oh my lol :lol:
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Thursday, 29th September 2011, 07:42

Re: Compiling problem

good, you're almost there. You need to add "install" to the first command line, the one with all the options. If you just type make install, it sees that you've changed options and tries to rebuild all.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

For this message the author galehar has received thanks:
helmen

Temple Termagant

Posts: 10

Joined: Saturday, 24th September 2011, 17:18

Post Friday, 30th September 2011, 18:12

Re: Compiling problem

Now WORK! Now I am going to build the package, regarding the use of "aplay" to enable the audio you know something? would be nice to hear the sound :)

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 9 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.