Open Surge Forum

A fun 2D retro platformer inspired by Sonic games and a game creation system

You are not logged in.

Announcement

Our community has moved to Discord! https://discord.gg/w8JqM7m

#1 2014-10-18 20:59:33

danildushistov
Member
Registered: 2014-10-18
Posts: 4

[help] Problems with compiling Open Sonic in Linux Mint 17 x86_64

Hi all!

I have problems with compiling Open Sonic in Linux Mint 17. I've been trying to solve this problem, and I don't know what to do.

Version of source code: opensnc-src-0.1.4.
Version of the system:

# uname -a
Linux linuxmint 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Installed allegro packages:

# dpkg --get-selections | grep "alleg"
liballegro4-dev                    install
liballegro4.4:amd64                install
liballegro4.4-plugin-alsa:amd64            install
liballegro5.0:amd64                install
libjpgalleg4.4:amd64                install

I am doing instructions from index.html and see the following output:

# chmod +x configure
# ./configure
Open Sonic version 0.1.4
Using CFLAGS=' '

WARNING: your Allegro version is 4.4.2. The recommended version is 4.4.1.
         Open Sonic may not compile properly!.

CMake Error at CMakeLists.txt:66 (MESSAGE):
  Fatal error: libloadpng not found! Please read the user manual
  (readme.html) to get help.


-- Configuring incomplete, errors occurred!
See also "/home/danil/Загрузки/opensnc-src-0.1.4/CMakeFiles/CMakeOutput.log".

I tried to install libloadpng in many ways (by installing libpng12-dev, for example), but I still get this message.
Please tell me what to do.

Offline

#2 2014-10-19 00:06:02

KZR
Member
Registered: 2010-07-14
Posts: 1,447
Website

Re: [help] Problems with compiling Open Sonic in Linux Mint 17 x86_64

libloadpng is different from libpng. with Synaptic you should have no problems finding and installing all required libraries.


SD_sml.pngSeD_sml.pngLTot_W_sml.png
https://discord.gg/w8JqM7m ---> Open Surge's Discord server

Offline

#3 2014-10-19 08:35:28

danildushistov
Member
Registered: 2014-10-18
Posts: 4

Re: [help] Problems with compiling Open Sonic in Linux Mint 17 x86_64

KZR wrote:

libloadpng is different from libpng. with Synaptic you should have no problems finding and installing all required libraries.

Thank you for your answer! I have read these threads and decided to install Open Surge:

http://opensnc.sourceforge.net/forum/vi … hp?id=1742
http://opensnc.sourceforge.net/forum/vi … hp?id=1267

Using Synaptic, I've installed libjpgalleg, libloadpng, liblogg, libvorbis, libopenal and libalure, but I still have troubles with compiling Modified Alfont 2.0.9.

When I try to compile it with this instruction: http://opensnc.sourceforge.net/alfont/, I get this:

# gcc -fPIC -DPIC -O2 -m32 -Iinclude `freetype-config --cflags` -o src/alfont.o -c src/alfont.c 
src/alfont.c: In function ‘alfont_ugetx’:
src/alfont.c:3765:4: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default]
    ugetxc((char**)s);
    ^
src/alfont.c:3765:4: note: expected ‘const char **’ but argument is of type ‘char **’
src/alfont.c:3767:2: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default]
  ugetxc((char**)s);
  ^
src/alfont.c:3767:2: note: expected ‘const char **’ but argument is of type ‘char **’
src/alfont.c:3771:2: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default]
  ugetxc(&lpszWS);
  ^
src/alfont.c:3771:2: note: expected ‘const char **’ but argument is of type ‘char **’
src/alfont.c:3773:2: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default]
  ugetxc(&lpszWS);
  ^
src/alfont.c:3773:2: note: expected ‘const char **’ but argument is of type ‘char **’
src/alfont.c:3818:2: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default]
  ugetxc((char**)s);
  ^
src/alfont.c:3818:2: note: expected ‘const char **’ but argument is of type ‘char **’
src/alfont.c:3820:2: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default]
  ugetxc((char**)s);
  ^
src/alfont.c:3820:2: note: expected ‘const char **’ but argument is of type ‘char **’
src/alfont.c: In function ‘alfont_ugetxc’:
src/alfont.c:4087:2: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default]
  ugetxc(&lpszWS);
  ^
src/alfont.c:4087:2: note: expected ‘const char **’ but argument is of type ‘char **’
src/alfont.c:4089:2: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default]
  ugetxc(&lpszWS);
  ^
src/alfont.c:4089:2: note: expected ‘const char **’ but argument is of type ‘char **’

Offline

#4 2014-10-24 06:09:49

danildushistov
Member
Registered: 2014-10-18
Posts: 4

Re: [help] Problems with compiling Open Sonic in Linux Mint 17 x86_64

It works! The problem was that I needed to use the 64-bit libraries to compile modified Alfont instead 32-bit versions, since I use a 64-bit system. Thus, I had to execute the following instructions for compiling Alfont:

wget http://opensnc.sourceforge.net/alfont/AlFont209.rar
unrar x AlFont209.rar   
cd alfont/  
wget http://opensnc.sourceforge.net/alfont/alfont-2.0.9-linux.patch  
patch -p1 < alfont-2.0.9-linux.patch   
gcc -fPIC -DPIC -O2 -m64 -Iinclude `freetype-config --cflags` -o src/alfont.o -c src/alfont.c  
gcc -O2 -m64 -shared -Wl,-soname,libalfont.so.2 -o libalfont.so.2.0.9 src/alfont.o `freetype-config --libs` `allegro-config --libs |sed 's/-lalleg_unsharable//'`  
sudo install -m 755 libalfont.so.2.0.9 /usr/lib/  
sudo install -m 644 include/alfont*.h /usr/include/  
sudo ln -s libalfont.so.2.0.9 /usr/lib/libalfont.so.2.0  
sudo ln -s libalfont.so.2.0.9 /usr/lib/libalfont.so.2  
sudo ln -s libalfont.so.2.0.9 /usr/lib/libalfont.so  
cd ..

Next I followed the instructions to compile the project from readme.html, and now Open Surge works fine! smile

Offline

Board footer

Powered by FluxBB  hosted by tuxfamily.org