The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Questions About *ubuntu Linux *.DEB Packaging...
JeZ-l-Lee


Joined: 20 Sep 2009
Posts: 572
Location: Long Island, New York, United States, Earth
Questions About *ubuntu Linux *.DEB Packaging...

Hi,

We need some help with packaging our SDL 1.2 game into *.DEB installer file for *ubuntu.
We have successfully made a *.DEB installer file but it only supports 64Bit *ubuntu.

Our question is how do we make a dual architecture *.DEB installer file?
Another question is how do we compile 32Bit executable when using 64Bit Kubuntu 14.04 LTS?
(we have both a makefile and also use Code::Blocks for compilations)

You can download the entire project here:
http://16bitsoft.com/Files/LF4/Linux/LF4_Linux_Beta4.zip

You can download the current 64Bit *.DEB installer file here:
http://16bitsoft.com/Files/LF4/Linux/lettersfall_4.0_64Bit.deb.

We found an excellent *.DEB maker application with GUI that works(with modification) on Kubuntu 14.04 LTS 64Bit:
http://debreate.sourceforge.net
After installing the Debreate DEB on Kubuntu 14.04 LTS 64Bit it does not run and the following file must be changed:
On line 36 of '/usr/share/debreate/panbuild.py' change 'self.md5 = _md5.MD5()' to 'self.md5 = _md5.new()'
(after above change then Debreate runs on Kubuntu 14.04 LTS 64Bit)

Game requires the following packages:
- SDL 1.2
- SDL_Image 1.2
- SDL_Mixer 1.2
- SDL_TTF 1.2

Thanks in advance!

JeZxLee
16BitSoft Inc.
Video Game Design Studio
www.16BitSoft.com

Here are some screenshot of game running on Kubuntu 14.04 LTS 64Bit:

samleo


Joined: 04 Mar 2014
Posts: 37
Location: Brazil
I think that is not possible to create a "dual package".

For compile to 32 with gcc/g++ for 32 bits computers you need the option -march=32 (or -m32). But, I don't remember if need install other package to activate this option, I'm talking of multilib.

Thanks for the debreate, I don't know this software.
JeZ-l-Lee


Joined: 20 Sep 2009
Posts: 572
Location: Long Island, New York, United States, Earth
samleo wrote:
I think that is not possible to create a "dual package".

For compile to 32 with gcc/g++ for 32 bits computers you need the option -march=32 (or -m32). But, I don't remember if need install other package to activate this option, I'm talking of multilib.

Thanks for the debreate, I don't know this software.
Hi,

Thanks for the reply.

I added "-m32"(no quotes) to my makefile but am getting the following errors:
Code:
jezxlee@jezxlee-B85M-HD3:~/Desktop/LF4_Linux_Beta4/LettersFall4-DEB$ make
g++ -m32 -pipe -Wall -g  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c src/main.cpp -o src/main.o
g++ -m32 -pipe -Wall -g  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c src/audio.cpp -o src/audio.o
g++ -m32 -pipe -Wall -g  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c src/data.cpp -o src/data.o
g++ -m32 -pipe -Wall -g  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c src/initialize.cpp -o src/initialize.o
g++ -m32 -pipe -Wall -g  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c src/input.cpp -o src/input.o
g++ -m32 -pipe -Wall -g  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c src/interface.cpp -o src/interface.o
g++ -m32 -pipe -Wall -g  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c src/logic.cpp -o src/logic.o
g++ -m32 -pipe -Wall -g  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c src/screens.cpp -o src/screens.o
g++ -m32 -pipe -Wall -g  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c src/settings.cpp -o src/settings.o
g++ -m32 -pipe -Wall -g  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c src/visuals.cpp -o src/visuals.o
g++ src/main.o src/audio.o src/data.o src/initialize.o src/input.o src/interface.o src/logic.o src/screens.o src/settings.o src/visuals.o -L/usr/lib/x86_64-linux-gnu -lSDL  -lGL -lSDL_ttf -lSDL_image -lSDL_mixer -o lettersfall4
/usr/bin/ld: i386 architecture of input file `src/main.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `src/audio.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `src/data.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `src/initialize.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `src/input.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `src/interface.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `src/logic.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `src/screens.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `src/settings.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `src/visuals.o' is incompatible with i386:x86-64 output
src/main.o: In function `main':
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/main.cpp:57: undefined reference to `operator new(unsigned int)'
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/main.cpp:60: undefined reference to `operator new(unsigned int)'
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/main.cpp:62: undefined reference to `operator new(unsigned int)'
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/main.cpp:67: undefined reference to `operator new(unsigned int)'
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/main.cpp:69: undefined reference to `operator new(unsigned int)'
src/main.o:/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/main.cpp:71: more undefined references to `operator new(unsigned int)' follow                                                                             
src/data.o: In function `Data::LoadHighScoresAndOptions()':                                                     
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/data.cpp:203: undefined reference to `std::istream::getline(char*, int)'                                                                                             
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/data.cpp:206: undefined reference to `std::istream::getline(char*, int)'                                                                                             
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/data.cpp:209: undefined reference to `std::istream::getline(char*, int)'                                                                                             
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/data.cpp:214: undefined reference to `std::istream::getline(char*, int)'
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/data.cpp:217: undefined reference to `std::istream::getline(char*, int)'
src/data.o:/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/data.cpp:220: more undefined references to `std::istream::getline(char*, int)' follow
src/screens.o: In function `Screens::DisplayTitleScreen()':
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/screens.cpp:271: undefined reference to `operator new[](unsigned int)'
src/settings.o: In function `Settings::Settings(int, char**)':
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/settings.cpp:64: undefined reference to `operator new[](unsigned int)'
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/settings.cpp:257: undefined reference to `operator new[](unsigned int)'
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/settings.cpp:262: undefined reference to `operator new[](unsigned int)'
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/settings.cpp:294: undefined reference to `operator new[](unsigned int)'
src/settings.o:/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/settings.cpp:300: more undefined references to `operator new[](unsigned int)' follow
collect2: error: ld returned 1 exit status
make: *** [lettersfall4] Error 1


Any help would be appreciated, thanks!

URL link to the SDL forum post(for people reading in the mailing list):
https://forums.libsdl.org/viewtopic.php?t=10545
Questions About *ubuntu Linux *.DEB Packaging...
Sik


Joined: 26 Nov 2011
Posts: 905
That last g++ invokation is trying to link a 64-bit program... (note
how -m32 is missing on that one, I guess you need it there too) Also
make sure you don't end up linking to the 64-bit libraries, Razz

2014-07-23 15:19 GMT-03:00, JeZ-l-Lee:
Quote:

samleo wrote:
Quote:
I think that is not possible to create a "dual package".

For compile to 32 with gcc/g++ for 32 bits computers you need the option
-march=32 (or -m32). But, I don't remember if need install other package
to activate this option, I'm talking of multilib.

Thanks for the debreate, I don't know this software.
Hi,

Thanks for the reply.

I added "-m32"(no quotes) to my makefile but am getting the following
errors:

Code:
jezxlee@jezxlee-B85M-HD3:~/Desktop/LF4_Linux_Beta4/LettersFall4-DEB$ make
g++ -m32 -pipe -Wall -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c
src/main.cpp -o src/main.o
g++ -m32 -pipe -Wall -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c
src/audio.cpp -o src/audio.o
g++ -m32 -pipe -Wall -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c
src/data.cpp -o src/data.o
g++ -m32 -pipe -Wall -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c
src/initialize.cpp -o src/initialize.o
g++ -m32 -pipe -Wall -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c
src/input.cpp -o src/input.o
g++ -m32 -pipe -Wall -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c
src/interface.cpp -o src/interface.o
g++ -m32 -pipe -Wall -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c
src/logic.cpp -o src/logic.o
g++ -m32 -pipe -Wall -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c
src/screens.cpp -o src/screens.o
g++ -m32 -pipe -Wall -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c
src/settings.cpp -o src/settings.o
g++ -m32 -pipe -Wall -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c
src/visuals.cpp -o src/visuals.o
g++ src/main.o src/audio.o src/data.o src/initialize.o src/input.o
src/interface.o src/logic.o src/screens.o src/settings.o src/visuals.o
-L/usr/lib/x86_64-linux-gnu -lSDL -lGL -lSDL_ttf -lSDL_image -lSDL_mixer -o
lettersfall4
/usr/bin/ld: i386 architecture of input file `src/main.o' is incompatible
with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `src/audio.o' is incompatible
with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `src/data.o' is incompatible
with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `src/initialize.o' is
incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `src/input.o' is incompatible
with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `src/interface.o' is
incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `src/logic.o' is incompatible
with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `src/screens.o' is incompatible
with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `src/settings.o' is
incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `src/visuals.o' is incompatible
with i386:x86-64 output
src/main.o: In function `main':
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/main.cpp:57:
undefined reference to `operator new(unsigned int)'
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/main.cpp:60:
undefined reference to `operator new(unsigned int)'
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/main.cpp:62:
undefined reference to `operator new(unsigned int)'
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/main.cpp:67:
undefined reference to `operator new(unsigned int)'
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/main.cpp:69:
undefined reference to `operator new(unsigned int)'
src/main.o:/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/main.cpp:71:
more undefined references to `operator new(unsigned int)' follow

src/data.o: In function `Data::LoadHighScoresAndOptions()':

/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/data.cpp:203:
undefined reference to `std::istream::getline(char*, int)'

/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/data.cpp:206:
undefined reference to `std::istream::getline(char*, int)'

/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/data.cpp:209:
undefined reference to `std::istream::getline(char*, int)'

/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/data.cpp:214:
undefined reference to `std::istream::getline(char*, int)'
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/data.cpp:217:
undefined reference to `std::istream::getline(char*, int)'
src/data.o:/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/data.cpp:220:
more undefined references to `std::istream::getline(char*, int)' follow
src/screens.o: In function `Screens::DisplayTitleScreen()':
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/screens.cpp:271:
undefined reference to `operator new[](unsigned int)'
src/settings.o: In function `Settings::Settings(int, char**)':
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/settings.cpp:64:
undefined reference to `operator new[](unsigned int)'
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/settings.cpp:257:
undefined reference to `operator new[](unsigned int)'
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/settings.cpp:262:
undefined reference to `operator new[](unsigned int)'
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/settings.cpp:294:
undefined reference to `operator new[](unsigned int)'
src/settings.o:/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/settings.cpp:300:
more undefined references to `operator new[](unsigned int)' follow
collect2: error: ld returned 1 exit status
make: *** [lettersfall4] Error 1



Any help would be appreciated, thanks!

URL link to the SDL forum post(for people reading in the mailing list):
https://forums.libsdl.org/viewtopic.php?t=10545

------------------------
JeZ+Lee
JessePalser <AT> Gmail <DOT> com
16BitSoft Inc.
Video Game Design Studio
www.16BitSoft.com





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Re: Questions About *ubuntu Linux *.DEB Packaging...
JeZ-l-Lee


Joined: 20 Sep 2009
Posts: 572
Location: Long Island, New York, United States, Earth
Sik wrote:
That last g++ invokation is trying to link a 64-bit program... (note
how -m32 is missing on that one, I guess you need it there too) Also
make sure you don't end up linking to the 64-bit libraries, Razz
Hi,

Here is my makefile, do you see something wrong with it for compiling 32Bit?
Code:
# LettersFall[TM] 4 - MAKEFILE by JeZ+Lee & mattmatteh...
# (C)opyright 2012 By www.16BitSoft.com

TARGET = lettersfall4

VERSION = 4.0

DEL_FILE = rm -f

CC      = g++
CFLAGS = -m32 -pipe -Wall -g #-"ggdb"
SDL_CFLAGS = $(shell sdl-config --cflags)
SDL_LIBS = $(shell sdl-config --libs)

OPENGL_LIBS   = -lGL
SDL_TTF_LIBS   = -lSDL_ttf
SDL_IMAGE_LIBS   = -lSDL_image
SDL_MIXER_LIBS  = -lSDL_mixer

OBJECTS = src/main.o \
          src/audio.o \
          src/data.o \
          src/initialize.o \
          src/input.o \
          src/interface.o \
          src/logic.o \
          src/screens.o \
          src/settings.o \
          src/visuals.o

SOURCES = src/main.cpp \
          src/audio.cpp \
          src/data.cpp \
          src/initialize.cpp \
          src/input.cpp \
          src/interface.cpp \
          src/logic.cpp \
          src/screens.cpp \
          src/settings.cpp \
          src/visuals.cpp

HEADERS = src/audio.h \
          src/data.h \
          src/initialize.h \
          src/input.h \
          src/interface.h \
          src/logic.h \
          src/screens.h \
          src/settings.h \
          src/visuals.h

$(TARGET): $(OBJECTS)
   $(CC) $(OBJECTS) $(SDL_LIBS) $(OPENGL_LIBS) $(SDL_TTF_LIBS) $(SDL_IMAGE_LIBS) $(SDL_MIXER_LIBS) -o $@

.cpp.o:
   $(CC) $(CFLAGS) $(SDL_CFLAGS) -c $< -o $@

clean:
   rm $(OBJECTS) $(TARGET)


We don't know much about makefiles so any help would be appreciated...
Thanks!
Questions About *ubuntu Linux *.DEB Packaging...
John
Guest

Add -m32 to CC and/or add $(CFLAGS) to the link command. Like this,

CC = g++ -m32

$(TARGET): $(OBJECTS)
$(CC) $(CFLAGS) $(OBJECTS) $(SDL_LIBS)...etc



On 07/23/2014 08:45 PM, JeZ-l-Lee wrote:
Quote:

Sik wrote:
Quote:
That last g++ invokation is trying to link a 64-bit program... (note
how -m32 is missing on that one, I guess you need it there too) Also
make sure you don't end up linking to the 64-bit libraries, Razz
Hi,

Here is my makefile, do you see something wrong with it for compiling 32Bit?

Code:
# LettersFall[TM] 4 - MAKEFILE by JeZ+Lee & mattmatteh...
# (C)opyright 2012 By www.16BitSoft.com

TARGET = lettersfall4

VERSION = 4.0

DEL_FILE = rm -f

CC = g++
CFLAGS = -m32 -pipe -Wall -g #-"ggdb"
SDL_CFLAGS = $(shell sdl-config --cflags)
SDL_LIBS = $(shell sdl-config --libs)

OPENGL_LIBS = -lGL
SDL_TTF_LIBS = -lSDL_ttf
SDL_IMAGE_LIBS = -lSDL_image
SDL_MIXER_LIBS = -lSDL_mixer

OBJECTS = src/main.o \
src/audio.o \
src/data.o \
src/initialize.o \
src/input.o \
src/interface.o \
src/logic.o \
src/screens.o \
src/settings.o \
src/visuals.o

SOURCES = src/main.cpp \
src/audio.cpp \
src/data.cpp \
src/initialize.cpp \
src/input.cpp \
src/interface.cpp \
src/logic.cpp \
src/screens.cpp \
src/settings.cpp \
src/visuals.cpp

HEADERS = src/audio.h \
src/data.h \
src/initialize.h \
src/input.h \
src/interface.h \
src/logic.h \
src/screens.h \
src/settings.h \
src/visuals.h

$(TARGET): $(OBJECTS)
$(CC) $(OBJECTS) $(SDL_LIBS) $(OPENGL_LIBS) $(SDL_TTF_LIBS) $(SDL_IMAGE_LIBS) $(SDL_MIXER_LIBS) -o $@

.cpp.o:
$(CC) $(CFLAGS) $(SDL_CFLAGS) -c $< -o $@

clean:
rm $(OBJECTS) $(TARGET)



We don't know much about makefiles so any help would be appreciated...
Thanks!

------------------------
JeZ+Lee
JessePalser &lt;AT&gt; Gmail &lt;DOT&gt; com
16BitSoft Inc.
Video Game Design Studio
www.16BitSoft.com







_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
samleo


Joined: 04 Mar 2014
Posts: 37
Location: Brazil
If the error persist maybe you should try install the i386 libs, I don't know how, I'm sorry. Or, the better is to try compile on a 32 bits system, I recommend to you install the virtual box and download an i386 distro, how about Ubuntu 12.04? So you will install the libs to compile on the vm.
JeZ-l-Lee


Joined: 20 Sep 2009
Posts: 572
Location: Long Island, New York, United States, Earth
samleo wrote:
If the error persist maybe you should try install the i386 libs, I don't know how, I'm sorry. Or, the better is to try compile on a 32 bits system, I recommend to you install the virtual box and download an i386 distro, how about Ubuntu 12.04? So you will install the libs to compile on the vm.
Hi,

I looked in Muon Package Manager on my Kubuntu 14.04 LTS 64Bit
but was unable to find 32Bit libs for SDL1.2, SDL1.2_Image, SDL1.2_Mixer, & SDL1.2_TTF.

I think at this point I will download Kubuntu 14.04 LTS 32Bit and install it into a VM.

Thanks!