Questions About *ubuntu Linux *.DEB Packaging

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:
[Image: http://16bitsoft.com/Files/LF4/Linux/LF4_Title.png ]
[Image: http://16bitsoft.com/Files/LF4/Linux/LF4_InGame.png ]

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.------------------------
My project

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 at 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 filesrc/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 filesrc/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 filesrc/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 filesrc/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 filesrc/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 tooperator 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 tooperator 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 tooperator 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 functionData::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 tostd::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 tostd::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 tostd::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 tooperator 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 tooperator 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 tooperator 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 tooperator 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

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, :stuck_out_tongue:

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

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 at 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 filesrc/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 filesrc/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 filesrc/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 filesrc/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 filesrc/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 tooperator 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 tooperator 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 tooperator 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 tostd::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 functionScreens::DisplayTitleScreen()’:
/home/jezxlee/Desktop/LF4_Linux_Beta4/LettersFall4-DEB/src/screens.cpp:271:
undefined reference to operator new[](unsigned int)' src/settings.o: In functionSettings::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 tooperator 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 tooperator 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

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, :stuck_out_tongue:
Hi,

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

Code:

LettersFall[TM] 4 - MAKEFILE by JeZ+Lee & mattmatteh…

©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 <AT> Gmail <DOT> com
16BitSoft Inc.
Video Game Design Studio
www.16BitSoft.com

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

CC = g++ -m32

$(TARGET): $(OBJECTS)
$(CC) $(CFLAGS) $(OBJECTS) $(SDL_LIBS)…etcOn 07/23/2014 08:45 PM, JeZ-l-Lee wrote:

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, :stuck_out_tongue:
Hi,

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

Code:

LettersFall[TM] 4 - MAKEFILE by JeZ+Lee & mattmatteh…

©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 <AT> Gmail <DOT> com
16BitSoft Inc.
Video Game Design Studio
www.16BitSoft.com


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

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.------------------------
My project

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!------------------------
JeZ+Lee
JessePalser <AT> Gmail <DOT> com
16BitSoft Inc.
Video Game Design Studio
www.16BitSoft.com