Page 1 of 1

Compiling problem

PostPosted: Sunday, 25th September 2011, 01:14
by helmen
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 :)

Re: Compiling problem

PostPosted: Sunday, 25th September 2011, 10:56
by galehar
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

Re: Compiling problem

PostPosted: Sunday, 25th September 2011, 12:30
by helmen
  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?

Re: Compiling problem

PostPosted: Sunday, 25th September 2011, 18:27
by galehar
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.

Re: Compiling problem

PostPosted: Sunday, 25th September 2011, 20:47
by helmen
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?

Re: Compiling problem

PostPosted: Monday, 26th September 2011, 02:30
by helmen
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.

Re: Compiling problem

PostPosted: Monday, 26th September 2011, 08:24
by galehar
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?

Re: Compiling problem

PostPosted: Tuesday, 27th September 2011, 06:13
by helmen
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 :(

Re: Compiling problem

PostPosted: Tuesday, 27th September 2011, 08:04
by galehar
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.

Re: Compiling problem

PostPosted: Wednesday, 28th September 2011, 07:39
by helmen
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?

Re: Compiling problem

PostPosted: Wednesday, 28th September 2011, 08:02
by galehar
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.

Re: Compiling problem

PostPosted: Wednesday, 28th September 2011, 14:20
by helmen
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?

Re: Compiling problem

PostPosted: Wednesday, 28th September 2011, 14:56
by galehar
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.

Re: Compiling problem

PostPosted: Wednesday, 28th September 2011, 15:20
by helmen
./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 :)

Re: Compiling problem

PostPosted: Thursday, 29th September 2011, 00:10
by helmen
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:

Re: Compiling problem

PostPosted: Thursday, 29th September 2011, 07:42
by galehar
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.

Re: Compiling problem

PostPosted: Friday, 30th September 2011, 18:12
by helmen
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 :)