Compilation problem.

A free software implementation of Prince of Persia 1.

Moderator: English Moderator Team

User avatar
Giorgos
Efendi
Efendi
Posts: 15
Joined: May 29th, 2016, 1:58 am

Compilation problem.

Post by Giorgos » March 8th, 2017, 10:58 pm

Hi! :D

I was trying to compile Mininim at my system (Debian Jessie KDE x64 Lua v.5.0.3).

Bootstrap and configuration completed succesfully, but making gave me the error:

Code: Select all

src/mininim.h:72:21: fatal error: lauxlib.h: no such file or directory
 #include <lauxlib.h>
                     ^
compilation terminated.
Any opinion what that means :?: :cry:
Development package is already installed.
TIA! :cool:
G.
I grow old, ever learning many things. Solon.

User avatar
oitofelix
Wise Scribe
Wise Scribe
Posts: 202
Joined: February 17th, 2016, 1:59 pm
Contact:

Re: Compilation problem.

Post by oitofelix » March 9th, 2017, 1:05 am

Giorgos wrote:Hi! :D
Hello Giorgos!
Giorgos wrote:Bootstrap and configuration completed succesfully, but making gave me the error:

Code: Select all

src/mininim.h:72:21: fatal error: lauxlib.h: no such file or directory
 #include <lauxlib.h>
                     ^
compilation terminated.
Any opinion what that means :?: :cry:
Have you installed liblualib50-dev? That's the package containing the offending file.

Also, invoke configure like this:

Code: Select all

./configure LUA_LIB="-llua50 -llualib50"
Because the canonical Autoconf macros provided for Lua configuration are unable to setup Lua linking flags properly (for Lua 5.0, at least).

Code: Select all

 88888  FFFFF Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
 8   8  F     http://oitofelix.freeshell.org/mininim/
 88888  FFFF  mailto:oitofelix@gnu.org
 8   8  F     irc://chat.freenode.org/oitofelix
 88888  F     Please, support my work: http://oitofelix.freeshell.org/funding.html

User avatar
Giorgos
Efendi
Efendi
Posts: 15
Joined: May 29th, 2016, 1:58 am

Re: Compilation problem.

Post by Giorgos » March 9th, 2017, 2:37 am

oitofelix wrote: Have you installed liblualib50-dev? That's the package containing the offending file.
THANKS oitofelix for your assistance!!! ;)

The only Lua package I didn't install, is the one for documentation. Interpreter, shared libraries and development ones, are all in place.
oitofelix wrote:Also, invoke configure like this:

Code: Select all

./configure LUA_LIB="-llua50 -llualib50"
Giving the proposed argument at ./configure, returns: "configure: error: cannot find libs for specified LUA_LIB"

PS. I think you're right for a presence of bug on Lua v.5, because seems like many headers files were not found.

Code: Select all

checking for a Lua interpreter with version >= 5.0, < 5.1... lua
checking for lua... /usr/bin/lua
checking for lua version... 5.0
checking for lua platform... unknown
checking for lua script directory... ${prefix}/share/lua50
checking for lua module directory... ${exec_prefix}/lib/lua50
checking if LUA_VERSION is defined... yes
checking lua.h usability... no
checking lua.h presence... no
checking for lua.h... no
checking lualib.h usability... no
checking lualib.h presence... no
checking for lualib.h... no
checking lauxlib.h usability... no
checking lauxlib.h presence... no
checking for lauxlib.h... no
checking luaconf.h usability... no
checking luaconf.h presence... no
checking for luaconf.h... no
checking for Lua headers in... /usr/include/lua50
checking lua.h usability... yes
checking lua.h presence... yes
checking for lua.h... yes
checking lualib.h usability... no
checking lualib.h presence... no
checking for lualib.h... no
checking lauxlib.h usability... no
checking lauxlib.h presence... no
checking for lauxlib.h... no
checking luaconf.h usability... no
checking luaconf.h presence... no
checking for luaconf.h... no
checking for Lua header version... 5.0
checking if Lua header version matches 5.0... yes
checking if LUA_VERSION is defined... yes
Specially for the problematic file:

Code: Select all

checking lauxlib.h usability... no
checking lauxlib.h presence... no
checking for lauxlib.h... no
I grow old, ever learning many things. Solon.

User avatar
oitofelix
Wise Scribe
Wise Scribe
Posts: 202
Joined: February 17th, 2016, 1:59 pm
Contact:

Re: Compilation problem.

Post by oitofelix » March 9th, 2017, 4:33 am

Inside MININIM's top-level source directory, please run the following commands and post their output as a reply to this post

Code: Select all

sudo apt install lua50 liblua50-dev liblualib50-dev libreadline-dev
git pull
./bootstrap
./configure LUA_LIB="-llua50 -llualib50"
make
./mininim
PS: I've updated the build instructions for apt-based distributions at MININIM's GitHub page.

Code: Select all

 88888  FFFFF Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
 8   8  F     http://oitofelix.freeshell.org/mininim/
 88888  FFFF  mailto:oitofelix@gnu.org
 8   8  F     irc://chat.freenode.org/oitofelix
 88888  F     Please, support my work: http://oitofelix.freeshell.org/funding.html

User avatar
Giorgos
Efendi
Efendi
Posts: 15
Joined: May 29th, 2016, 1:58 am

Re: Compilation problem.

Post by Giorgos » March 9th, 2017, 3:42 pm

1) Installing packages.

Code: Select all

ib50-dev libreadline-dev9 PM~#>apt-get install automake autoconf gcc make gnulib cmake lua50 liblua50-dev libluali
Reading package lists... Done
Building dependency tree
Reading state information... Done
autoconf is already the newest version.
automake is already the newest version.
cmake is already the newest version.
gcc is already the newest version.
gnulib is already the newest version.
liblua50-dev is already the newest version.
liblualib50-dev is already the newest version.
lua50 is already the newest version.
make is already the newest version.
libreadline-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root-Thu 09/03/2017 01:19 PM~#>
2) git clone https://github.com/oitofelix/mininim.git

Done.

3) a) Bootstrap completed.
b) Configure completed.
c) Make failed.

Konsole output (for bootstrap - configure - make) here:
https://drive.google.com/file/d/0BzArF1 ... sp=sharing
I grow old, ever learning many things. Solon.

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3164
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Compilation problem.

Post by Norbert » March 9th, 2017, 3:55 pm

Giorgos wrote:c) Make failed.
Same ALLEGRO_MENU error as I got here.
You'll probably need to git clone https://github.com/oitofelix/allegro5.git etc. as instructed in the Building section of the GitHub page.

User avatar
Giorgos
Efendi
Efendi
Posts: 15
Joined: May 29th, 2016, 1:58 am

Re: Compilation problem.

Post by Giorgos » March 9th, 2017, 5:29 pm

Ooops!!! :shock:
Indeed I had, the repositories Allegro version.
Sorry!!! :oops:

I removed the wrong version and I installed the forked version.

2 notes here:
1) "#apt-get build-dep allegro5" (shouldn't it be apt-get install) is not possible to complete, because there aren't such packages on repositories.
You can search for Debian packages here: https://www.debian.org/distrib/packages#search_packages

2) "cmake" (without arguments deosn't do something.
I suppose it's a typo and should be "cmake .." (which I gave).

Now with the correct Allegro version, I'll try again and I'll be back.

EDIT:
Nope!
Configure didn't complete successfully.
Allegro didn't install correctly.

Code: Select all

checking for ALLEGRO... yes
checking for ALLEGRO_IMAGE... yes
checking for ALLEGRO_AUDIO... yes
checking for ALLEGRO_ACODEC... yes
checking for ALLEGRO_FONT... yes
checking for ALLEGRO_PRIMITIVES... yes
checking for ALLEGRO_MAIN... yes
checking for ALLEGRO_DIALOG... no
checking for ALLEGRO_DIALOG... no
configure: error: MININIM requires Allegro 5.0.9 (or superior) dialogs addon
I grow old, ever learning many things. Solon.

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3164
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Compilation problem.

Post by Norbert » March 9th, 2017, 6:14 pm

Giorgos wrote:1) "#apt-get build-dep allegro5" (shouldn't it be apt-get install) is not possible to complete, because there aren't such packages on repositories.
Yes, that line in the documentation is not - no longer - valid.
Giorgos wrote:2) "cmake" (without arguments deosn't do something.
I suppose it's a typo and should be "cmake .." (which I gave).
Yes, that line is also not valid.
I did
-----
cmake .
-----
myself.
However, I think it's customary to use something like
-----
mkdir build-dir
cd build-dir
cmake ..
-----
Giorgos wrote:Configure didn't complete successfully.
Allegro didn't install correctly.
For me configure works, but make ends with:
-----
CCLD mininim
make[4]: Leaving directory '/home/norbert/mininim'
help2man: can't get `--help' info from ../../mininim
Try `--no-discard-stderr' if option outputs to stderr
Makefile:1719: recipe for target 'mininim.1' failed
make[3]: *** [mininim.1] Error 127
make[3]: Leaving directory '/home/norbert/mininim/doc/man'
Makefile:1860: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/norbert/mininim/doc'
Makefile:2347: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/norbert/mininim'
Makefile:1808: recipe for target 'all' failed
make: *** [all] Error 2
norbert@ren ~/mininim $
-----

And then if I run the program it says:
-----
./mininim: error while loading shared libraries: liballegro.so.5.2: cannot open shared object file: No such file or directory
-----

I could probably figure out what the problem is there (maybe a symbolic link would fix it), but I'm busy with other things.

Regardless, if we both can't make it work out of the box with the available instructions, it needs work.

User avatar
Giorgos
Efendi
Efendi
Posts: 15
Joined: May 29th, 2016, 1:58 am

Re: Compilation problem.

Post by Giorgos » March 9th, 2017, 7:43 pm

Norbert wrote: -----
cmake .
-----
myself.
However, I think it's customary to use something like
-----
mkdir build-dir
cd build-dir
cmake ..
-----
Correct! ;)

I retried, but nothing changed. :?
I grow old, ever learning many things. Solon.

User avatar
oitofelix
Wise Scribe
Wise Scribe
Posts: 202
Joined: February 17th, 2016, 1:59 pm
Contact:

Re: Compilation problem.

Post by oitofelix » March 9th, 2017, 8:14 pm

Giorgos wrote:1) "#apt-get build-dep allegro5" (shouldn't it be apt-get install) is not possible to complete, because there aren't such packages on repositories. You can search for Debian packages here: https://www.debian.org/distrib/packages#search_packages
Here is Debian Jessie's allegro5 source package page. Probably, you was unable to fetch it because the corresponding deb-src lines are lacking in your /etc/apt/sources.list file. Add the following line or equivalent there:

Code: Select all

deb-src http://ftp.debian.org/debian/ jessie main
Giorgos wrote:2) "cmake" (without arguments deosn't do something. I suppose it's a typo and should be "cmake .." (which I gave).
I think I intended to write

Code: Select all

cmake .
(with one dot). Notice that according to the instructions you supposedly are at the top directory of Allegro's source tree when running that.
Giorgos wrote: Nope!
Configure didn't complete successfully.
Allegro didn't install correctly.

Code: Select all

...
checking for ALLEGRO_DIALOG... no
checking for ALLEGRO_DIALOG... no
configure: error: MININIM requires Allegro 5.0.9 (or superior) dialogs addon
This is probably because you didn't successfully install Allegro's build dependencies using

Code: Select all

apt-get build-dep allegro5
command, thus the dialogs add-on wasn't built.
Norbert wrote: then if I run the program it says:
-----
./mininim: error while loading shared libraries: liballegro.so.5.2: cannot open shared object file: No such file or directory
-----

I could probably figure out what the problem is there (maybe a symbolic link would fix it), but I'm busy with other things.
Perhaps that's because you have your distribution's Allegro installed alongside MININIM's fork. Try

Code: Select all

sudo apt-get remove liballegro5-dev liballegro-image5-dev \
  liballegro-audio5-dev liballegro-acodec5-dev liballegro-dialog5-dev
Then don't forget to run

Code: Select all

sudo ldconfig
.
Norbert wrote:Regardless, if we both can't make it work out of the box with the available instructions, it needs work.
Well, there are an infinitude of possible configurations for GNU/Linux systems out there. This is life when it comes to building software. I can't possibly foresee every possible corner case in which the build procedure can fail. As experience shows, build recipes are just general guidance to point people committed to the task of building from source to the right direction at best. There is absolutely no guarantee, implicit or otherwise, that they will work for you out of the box if you follow them rigorously. You should just consider yourself lucky, in case they do. That's not to say however that I won't help users building MININIM or that MININIM's building documentation can't be improved.

Code: Select all

 88888  FFFFF Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
 8   8  F     http://oitofelix.freeshell.org/mininim/
 88888  FFFF  mailto:oitofelix@gnu.org
 8   8  F     irc://chat.freenode.org/oitofelix
 88888  F     Please, support my work: http://oitofelix.freeshell.org/funding.html

User avatar
Giorgos
Efendi
Efendi
Posts: 15
Joined: May 29th, 2016, 1:58 am

Re: Compilation problem.

Post by Giorgos » March 9th, 2017, 10:10 pm

1) I launched the software-properties-kde utility and indeed I had disabled the source repositories.
I never used them for many years now. When I'm compiling code I just download the last version and compile it (instead of using the mostly outdated repos sources).
So I totally forgot it! :oops:

2) I made a complete removal of repo Allegro before fork's installation, but even the complete removal, always leaving traces behind.
Though I didn't thought, running ldconfig.

3) Indeed it's impossible for one to maintain a package, for endless distributions! Noone has to be blamed for that!
Distributions are varying one from another, but that's the beauty of Linux.

4) I followed from scratch the above mentioned steps.
Despite that, make still fails.
I'm somewhat confused right now. I'll review it again, tomorrow.
THANKS guys for your help!!! ;)

Code: Select all

giorgos-Πεμ 09/03/2017 09:19 μμ~/mininim>make
make  all-recursive
make[1]: Entering directory '/home/giorgos/mininim'
Making all in gnulib
make[2]: Entering directory '/home/giorgos/mininim/gnulib'
  GEN      alloca.h
  GEN      configmake.h
  GEN      c++defs.h
  GEN      arg-nonnull.h
  GEN      warn-on-use.h
  GEN      dirent.h
  GEN      fcntl.h
  GEN      getopt.h
  GEN      glob.h
  GEN      math.h
  GEN      signal.h
  GEN      stdio.h
  GEN      stdlib.h
  GEN      string.h
  GEN      strings.h
  GEN      sys/ioctl.h
  GEN      sys/socket.h
  GEN      sys/stat.h
  GEN      sys/time.h
  GEN      sys/types.h
  GEN      sys/uio.h
  GEN      sys/wait.h
  GEN      time.h
  GEN      unistd.h
  GEN      wchar.h
  GEN      wctype.h
make  all-recursive
make[3]: Entering directory '/home/giorgos/mininim/gnulib'
make[4]: Entering directory '/home/giorgos/mininim/gnulib'
  CC       argp-ba.o
  CC       argp-eexst.o
  CC       argp-fmtstream.o
  CC       argp-fs-xinl.o
  CC       argp-help.o
  CC       argp-parse.o
  CC       argp-pin.o
  CC       argp-pv.o
  CC       argp-pvh.o
  CC       argp-xinl.o
  CC       dirname-lgpl.o
  CC       basename-lgpl.o
  CC       stripslash.o
  CC       exitfail.o
  CC       fd-hook.o
  CC       full-write.o
  CC       localcharset.o
  CC       glthread/lock.o
  CC       math.o
  CC       nonblocking.o
  CC       printf-frexp.o
  CC       printf-frexpl.o
  CC       progname.o
  CC       safe-write.o
  CC       strnlen1.o
  CC       sys_socket.o
  CC       glthread/threadlib.o
  CC       unistd.o
  CC       wctype-h.o
  CC       xmalloc.o
  CC       xalloc-die.o
  CC       xprintf.o
  CC       xsize.o
  CC       xvasprintf.o
  CC       xasprintf.o
  CC       asnprintf.o
  CC       asprintf.o
  CC       dprintf.o
  CC       fprintf.o
  CC       fseterr.o
  CC       getopt.o
  CC       getopt1.o
  CC       getpass.o
  CC       glob.o
  CC       ioctl.o
  CC       isnanl.o
  CC       obstack_printf.o
  CC       printf.o
  CC       printf-args.o
  CC       printf-parse.o
  CC       snprintf.o
  CC       sprintf.o
  CC       strerror_r.o
  CC       vasnprintf.o
  CC       vasprintf.o
  CC       vdprintf.o
  CC       vfprintf.o
  CC       vprintf.o
  CC       vsnprintf.o
  CC       vsprintf.o
  AR       libgnu.a
  GEN      charset.alias
  GEN      ref-add.sed
  GEN      ref-del.sed
make[4]: Leaving directory '/home/giorgos/mininim/gnulib'
make[3]: Leaving directory '/home/giorgos/mininim/gnulib'
make[2]: Leaving directory '/home/giorgos/mininim/gnulib'
Making all in doc
make[2]: Entering directory '/home/giorgos/mininim/doc'
Making all in man
make[3]: Entering directory '/home/giorgos/mininim/doc/man'
  GEN      mininim.1
make[4]: Entering directory '/home/giorgos/mininim'
  CC       src/mininim.h.gch
  CC       src/mininim.o
  CC       src/ui.o
  CC       src/anim.o
  CC       src/pos.o
  CC       src/physics.o
  CC       src/level.o
  CC       src/fix.o
  CC       src/stars.o
  CC       src/floor.o
  CC       src/broken-floor.o
  CC       src/skeleton-floor.o
  CC       src/loose-floor.o
  CC       src/opener-floor.o
  CC       src/closer-floor.o
  CC       src/spikes-floor.o
  CC       src/door.o
  CC       src/level-door.o
  CC       src/pillar.o
  CC       src/big-pillar.o
  CC       src/chopper.o
  CC       src/bricks.o
  CC       src/torch.o
  CC       src/window.o
  CC       src/balcony.o
  CC       src/arch.o
  CC       src/carpet.o
  CC       src/mirror.o
  CC       src/room.o
  CC       src/fire.o
  CC       src/potion.o
  CC       src/sword.o
  CC       src/clock.o
  CC       src/princess.o
  CC       src/jaffar.o
  CC       src/mouse.o
  CC       src/audio-data.o
  CC       src/cutscenes.o
  CC       src/fight.o
  CC       src/dat.o
  CC       src/wall.o
  CC       src/kid/kid.o
  CC       src/kid/kid-normal.o
  CC       src/kid/kid-walk.o
  CC       src/kid/kid-start-run.o
  CC       src/kid/kid-run.o
  CC       src/kid/kid-stop-run.o
  CC       src/kid/kid-turn-run.o
  CC       src/kid/kid-couch.o
  CC       src/kid/kid-turn.o
  CC       src/kid/kid-stabilize.o
  CC       src/kid/kid-jump.o
  CC       src/kid/kid-vjump.o
  CC       src/kid/kid-run-jump.o
  CC       src/kid/kid-misstep.o
  CC       src/kid/kid-hang.o
  CC       src/kid/kid-hang-wall.o
  CC       src/kid/kid-hang-free.o
  CC       src/kid/kid-climb.o
  CC       src/kid/kid-unclimb.o
  CC       src/kid/kid-fall.o
  CC       src/kid/kid-drink.o
  CC       src/kid/kid-raise-sword.o
  CC       src/kid/kid-keep-sword.o
  CC       src/kid/kid-take-sword.o
  CC       src/kid/kid-sword-normal.o
  CC       src/kid/kid-sword-walkf.o
  CC       src/kid/kid-sword-walkb.o
  CC       src/kid/kid-sword-defense.o
  CC       src/kid/kid-sword-attack.o
  CC       src/kid/kid-sword-hit.o
  CC       src/kid/kid-die.o
  CC       src/kid/kid-stairs.o
  CC       src/guard/guard.o
  CC       src/guard/guard-normal.o
  CC       src/guard/guard-vigilant.o
  CC       src/guard/guard-hit.o
  CC       src/guard/guard-die.o
  CC       src/guard/guard-fall.o
  CC       src/guard/guard-walkf.o
  CC       src/guard/guard-walkb.o
  CC       src/guard/guard-attack.o
  CC       src/guard/guard-defense.o
  CC       src/levels/native-level.o
  CC       src/levels/consistency-level.o
  CC       src/levels/legacy-level.o
  CC       src/levels/dat-level.o
  CC       src/levels/plv-level.o
  CC       src/kernel/event.o
  CC       src/kernel/video.o
  CC       src/kernel/audio.o
  CC       src/kernel/memory.o
  CC       src/kernel/gamepad.o
  CC       src/kernel/pointer.o
  CC       src/kernel/random.o
  CC       src/kernel/array.o
  CC       src/kernel/file.o
  CC       src/kernel/dialog.o
  CC       src/kernel/xconfig.o
  CC       src/kernel/diff.o
  CC       src/kernel/xmath.o
  CC       src/kernel/xstring.o
  CC       src/bmenu.o
  CC       src/editor.o
  CC       src/debug.o
  CC       src/undo.o
  CC       src/multi-room.o
  CC       src/box.o
  CC       src/replay.o
  CC       src/script/repl.o
  CC       src/script/script.o
  CC       src/script/L_mininim.o
  CC       src/script/L_mininim.level.o
  CC       src/script/L_mininim.level.position.o
  CC       src/script/L_mininim.actor.o
  CC       src/script/L_mininim.audio.o
  CC       src/script/L_mininim.audio.source.o
  CC       src/script/L_mininim.video.o
  CC       src/script/L_mininim.video.bitmap.o
  CC       src/script/L_mininim.video.color.o
  CC       src/script/L_mininim.video.coordinate.o
  CC       src/script/L_mininim.video.rectangle.o
  CC       src/script/L_mininim.setting.o
  CC       src/script/L_mininim.mouse.o
  CC       src/script/L_mininim.multiroom.o
  CC       src/script/L_mininim.profiler.o
  CC       src/script/L_mininim.debugger.o
  CC       src/script/L_mininim.math.o
  CCLD     mininim
make[4]: Leaving directory '/home/giorgos/mininim'
help2man: αδυναμία λήψης `--help' info από ../../mininim
Try `--no-discard-stderr' if option outputs to stderr
Makefile:1708: recipe for target 'mininim.1' failed
make[3]: *** [mininim.1] Error 127
make[3]: Leaving directory '/home/giorgos/mininim/doc/man'
Makefile:1851: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/giorgos/mininim/doc'
Makefile:2338: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/giorgos/mininim'
Makefile:1798: recipe for target 'all' failed
make: *** [all] Error 2
giorgos-Πεμ 09/03/2017 09:20 μμ~/mininim>

PS.
The PDF created successfully.
I grow old, ever learning many things. Solon.

User avatar
oitofelix
Wise Scribe
Wise Scribe
Posts: 202
Joined: February 17th, 2016, 1:59 pm
Contact:

Re: Compilation problem.

Post by oitofelix » March 9th, 2017, 10:34 pm

Giorgos wrote:4) I followed from scratch the above mentioned steps.
Despite that, make still fails.

Code: Select all

  CCLD     mininim
make[4]: Leaving directory '/home/giorgos/mininim'
help2man: αδυναμία λήψης `--help' info από ../../mininim
Try `--no-discard-stderr' if option outputs to stderr
Makefile:1708: recipe for target 'mininim.1' failed
The executable has been built, though. What error messages do you get from running it?
Giorgos wrote:I'm somewhat confused right now. I'll review it again, tomorrow.
THANKS guys for your help!!! ;)
You're welcome.

Code: Select all

 88888  FFFFF Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
 8   8  F     http://oitofelix.freeshell.org/mininim/
 88888  FFFF  mailto:oitofelix@gnu.org
 8   8  F     irc://chat.freenode.org/oitofelix
 88888  F     Please, support my work: http://oitofelix.freeshell.org/funding.html

User avatar
Giorgos
Efendi
Efendi
Posts: 15
Joined: May 29th, 2016, 1:58 am

Re: Compilation problem.

Post by Giorgos » March 10th, 2017, 3:54 am

oitofelix wrote: The executable has been built, though. What error messages do you get from running it?
Indeed! I got tired in the process and I missed it! :D
Seems like everything is running flawlessly. I'm only getting a segmentation fault, when exiting.

Code: Select all

giorgos-Παρ 10/03/2017 03:27 πμ~/mininim>./mininim
MININIM 170309 Copyright (C) 2015-2017 Bruno Félix Rezende Ribeiro

MININIM is free software under GPLv3+.
You are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Please, support MININIM development!
http://oitofelix.github.io/funding.html

Lua 5.0.3 Copyright (C) 1994-2006 Tecgraf, PUC-Rio
MININIM>
MININIM: Hope you enjoyed it!
Σφάλμα κατάτμησης (segmentation fault)
giorgos-Παρ 10/03/2017 03:28 πμ~/mininim>
Tomorrow I'll play it, so I can test it more thoroughly.

PS. Meanwhile, because of our thoughts of Linux variation amongst distributions, I made a small research and seems like many people consider (for complex and sophisticated projects, like this one) to be a solution the distribution of a static binary (for avoiding the compilation).
A more modern approach that gains more and more favor lately, is the distribution of an AppImage (instead of the classic static binary solution).
I grow old, ever learning many things. Solon.

User avatar
oitofelix
Wise Scribe
Wise Scribe
Posts: 202
Joined: February 17th, 2016, 1:59 pm
Contact:

Re: Compilation problem.

Post by oitofelix » March 10th, 2017, 5:21 am

Giorgos wrote:I'm only getting a segmentation fault, when exiting.
Could you recompile it with debugging enabled (passing "--enable-debug" option to the configure script) and get a backtrace?
Giorgos wrote:I made a small research and seems like many people consider (for complex and sophisticated projects, like this one) to be a solution the distribution of a static binary (for avoiding the compilation). A more modern approach that gains more and more favor lately, is the distribution of an AppImage (instead of the classic static binary solution).
This problem has been solved for MININIM already. The *-release family of scripts are intended to build universal binaries for the 3 platforms MININIM has been ported to. In particular, running gnu-linux-release on Debian Jessie i386 should result in a binary that works on any GNU/Linux distribution featuring at least Linux 2.6.32 and a sufficiently recent/standard X (that's about any common distro from the past 7 years or so). I've tested it quite a bit in virtual environments with good results.

I'm already planning to make those universal binaries available in every forthcoming release. However, I'll need a month or two to put everything in place because, as you may have noticed, MININIM is going through a big change. I'm exporting all relevant logic to Lua modules in order to implement a dynamic, multithreaded, on-the-fly scriptable environment (following the tradition of GNU Emacs), which will offer a standard interface for video, audio, special events, level modules, cinematics and general scripting plug-and-play packages. This is the cornerstone that will allow MININIM to become a truly general Prince of Persia 1 engine. Unfortunately, I'm always too busy coding, and thus I'm unable to perform documentation, testing and maintenance tasks satisfactorily.
Giorgos wrote:Tomorrow I'll play it, so I can test it more thoroughly.
Thanks for testing MININIM.

Code: Select all

 88888  FFFFF Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
 8   8  F     http://oitofelix.freeshell.org/mininim/
 88888  FFFF  mailto:oitofelix@gnu.org
 8   8  F     irc://chat.freenode.org/oitofelix
 88888  F     Please, support my work: http://oitofelix.freeshell.org/funding.html

User avatar
Giorgos
Efendi
Efendi
Posts: 15
Joined: May 29th, 2016, 1:58 am

Re: Compilation problem.

Post by Giorgos » March 10th, 2017, 3:27 pm

oitofelix wrote:
Could you recompile it with debugging enabled (passing "--enable-debug" option to the configure script) and get a backtrace?
Yes of course!
Here's the gdb.txt:

Code: Select all

The program being debugged has been started already.
Start it from the beginning? (y or n) Starting program: /home/giorgos/mininim/mininim 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffea5f9700 (LWP 17281)]
[New Thread 0x7fffe709c700 (LWP 17282)]
[New Thread 0x7fffe5fc8700 (LWP 17283)]
[New Thread 0x7fffd3ffe700 (LWP 17284)]
[New Thread 0x7fffd37fd700 (LWP 17285)]
[New Thread 0x7fffd2ffc700 (LWP 17286)]
[New Thread 0x7fffd27fb700 (LWP 17287)]
[New Thread 0x7fffd1ffa700 (LWP 17288)]
[New Thread 0x7fffd17f9700 (LWP 17289)]
[New Thread 0x7fffd0ff8700 (LWP 17290)]
[Thread 0x7fffd0ff8700 (LWP 17290) exited]
[Thread 0x7fffd1ffa700 (LWP 17288) exited]
[Thread 0x7fffd27fb700 (LWP 17287) exited]
[Thread 0x7fffd2ffc700 (LWP 17286) exited]
[Thread 0x7fffd37fd700 (LWP 17285) exited]
[Thread 0x7fffd3ffe700 (LWP 17284) exited]
[Thread 0x7fffe709c700 (LWP 17282) exited]
[Thread 0x7fffd17f9700 (LWP 17289) exited]
[Thread 0x7fffea5f9700 (LWP 17281) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00007fffe9590034 in ?? () from /usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so
A debugging session is active.

	Inferior 1 [process 17280] will be killed.

Quit anyway? (y or n) Not confirmed.
  Num  Description       Executable        
* 1    process 17280     /home/giorgos/mininim/mininim 
A debugging session is active.

	Inferior 1 [process 17280] will be killed.

Quit anyway? (y or n) Please answer y or n.
In case you prefer another debugger, or giving any advanced commands, just tell me.
PS.This time (with the debug symbols not stripped), make completed successfully.
oitofelix wrote: This problem has been solved for MININIM already. The *-release family of scripts are intended to build universal binaries for the 3 platforms MININIM has been ported to. In particular, running gnu-linux-release on Debian Jessie i386 should result in a binary that works on any GNU/Linux distribution featuring at least Linux 2.6.32 and a sufficiently recent/standard X (that's about any common distro from the past 7 years or so). I've tested it quite a bit in virtual environments with good results.

I'm already planning to make those universal binaries available in every forthcoming release. However, I'll need a month or two to put everything in place because, as you may have noticed, MININIM is going through a big change. I'm exporting all relevant logic to Lua modules in order to implement a dynamic, multithreaded, on-the-fly scriptable environment (following the tradition of GNU Emacs), which will offer a standard interface for video, audio, special events, level modules, cinematics and general scripting plug-and-play packages. This is the cornerstone that will allow MININIM to become a truly general Prince of Persia 1 engine. Unfortunately, I'm always too busy coding, and thus I'm unable to perform documentation, testing and maintenance tasks satisfactorily.
GREAT!!! :D
oitofelix wrote: Thanks for testing MININIM.
The pleasure is mine! :D
I grow old, ever learning many things. Solon.

Post Reply