Skip to content

Compiling for i386

Minexew edited this page Dec 26, 2020 · 1 revision

(Tested on Debian Lenny. Since this is an old OS, HTTP downloads are used in place of HTTPS. Still, the provided compiler (GCC 4) is too new to build phoneME correctly.)

# Download everything
wget ftp://ftp.gnu.org/gcc/releases/gcc-3.4.6/gcc-3.4.6.tar.gz
wget http://www.libsdl.org/release/SDL-1.2.15.tar.gz
wget http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12.tar.gz
wget http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.12.tar.gz

# Build GCC
tar xfva gcc-3.4.6.tar.gz
mkdir gcc.build
cd gcc.build
../gcc-3.4.6/configure --prefix=/opt/gcc3 --enable-languages=c,c++
make && make install

# Build SDL
cd SDL-1.2.15
./configure --prefix=/opt/gcc3
make && make install

# Build SDL_image
cd SDL_image-1.2.12
./configure --prefix=/opt/gcc3
make && make install

# Build SDL_mixer
cd SDL_image-1.2.12
./configure --prefix=/opt/gcc3
make && make install

# Manually edit phoneme_feature/midp/build/linux_sdl_gcc/sdl.gmk (TODO: sed)
#-EXTRA_INCLUDES  += -I/usr/include/SDL 
#+EXTRA_INCLUDES  += -I/opt/gcc3/include/SDL

# Manually edit phoneme_feature/midp/src/events/mastermode_port/sdl/native/midp_msgQueue_md.c
# Replace SDLK_LSUPER, SDLK_MENU with keys easier to produce in QEMU, such as SDLK_TAB & SDLK_BACKSPACE

# Manually edit compile.sh to comment out everything ARM-related

# Build phoneME
export PATH=/opt/gcc3/bin:$PATH
./compile.sh
Clone this wiki locally