New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !
Ancient Firebird on B3
Ancient Firebird on B3
Soooo....
I used one of B3 I owned as an SMB server for a friend's company. Long story short, I kinda promised him to run a database for an app he's using on it. I figured it's going to be easy...
...until I discovered that the app works with Firebird 1.5.6, period. I tried exporting the data and using FB2.1 or 2.5, but neither works (for example "Dynamic SQL Error / SQL error code = -204 / Ambiguous field name between table GRUPY and table STUDENT_GRUPA / ID_GRUPY" - thank you, developer of said app :/).
So for the last week I tried to figure out how to compile FB1.5.6 for B3. Well, I didn't make much progress - makefiles are kinda arcane for me, autoconf even more so. I'm using the package http://sourceforge.net/projects/firebir ... 2/download
Firebird support list silently ignored my plea for help, and I don't have much of an idea of where to head now.
Any assistance will be appreciated.
I used one of B3 I owned as an SMB server for a friend's company. Long story short, I kinda promised him to run a database for an app he's using on it. I figured it's going to be easy...
...until I discovered that the app works with Firebird 1.5.6, period. I tried exporting the data and using FB2.1 or 2.5, but neither works (for example "Dynamic SQL Error / SQL error code = -204 / Ambiguous field name between table GRUPY and table STUDENT_GRUPA / ID_GRUPY" - thank you, developer of said app :/).
So for the last week I tried to figure out how to compile FB1.5.6 for B3. Well, I didn't make much progress - makefiles are kinda arcane for me, autoconf even more so. I'm using the package http://sourceforge.net/projects/firebir ... 2/download
Firebird support list silently ignored my plea for help, and I don't have much of an idea of where to head now.
Any assistance will be appreciated.
Re: Ancient Firebird on B3
we're sorry but our psychic department is currently understaffed. Please explain your problem in more detail and maybe sombody will have a suggestion. Mind you thast your question is about firebird and unlikely to be related to the B3
Re: Ancient Firebird on B3
Ubi, just read the post with understanding.
I need help compiling Firebird 1.5.6 from sources, on ARM platform.
I thought I'll give more background, but I can see it overloaded your brain.
I need help compiling Firebird 1.5.6 from sources, on ARM platform.
I thought I'll give more background, but I can see it overloaded your brain.
Re: Ancient Firebird on B3
we're not that easily overloaded.
But you did not even specify if the problem is during make, after installation or whether you did not even install gcc or know what gcc is.
There really is no point in getting engaged without knowing what the error report is and how come you know that there is a problem at all.
But you did not even specify if the problem is during make, after installation or whether you did not even install gcc or know what gcc is.
There really is no point in getting engaged without knowing what the error report is and how come you know that there is a problem at all.
Re: Ancient Firebird on B3
Thank you for being the cool-headed here 
So the problem here is that 1.5.6 is only prepared for Windows, Linux 686, SPARC and Darwin, as far as I can tell. I was hoping that compilation might be as easy as just setting gcc to generate armv5tel code, but after a day's worth of reading today I doubt if it is possible at all.
Anyway, in ./doc/README.makefiles the instruction to compile is:
which fizzles at the very first stage:
Googled a bit and found suggestions to install libtool package - but it's already installed on my system.
By some other suggestions, I tried running libtoolize:
Added `AC_CONFIG_MACRO_DIR([m4])' to configure.in and created aclocal.m4:
After that:
There's no Makefile.am, so I'm not sure what to do with this suggestion.
Re-run autoconf, which finishes without further comments, and ./configure yields:
Not surprising, given that:
And with this, I'm stuck. As said before, any help is appreciated.

So the problem here is that 1.5.6 is only prepared for Windows, Linux 686, SPARC and Darwin, as far as I can tell. I was hoping that compilation might be as easy as just setting gcc to generate armv5tel code, but after a day's worth of reading today I doubt if it is possible at all.
Anyway, in ./doc/README.makefiles the instruction to compile is:
Code: Select all
autoconf
./configure
$cd src
$make > make.log 2>&1 ; cat make.log | grep -v warning > make2.log ; vi make2.log
Code: Select all
~/firebird-1.5.6.5026$ autoconf
configure.in:193: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.in:194: error: possibly undefined macro: AC_LIBTOOL_DLOPEN
configure.in:195: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
By some other suggestions, I tried running libtoolize:
Code: Select all
$ libtoolize
libtoolize: You should add the contents of the following files to `aclocal.m4':
libtoolize: `/usr/share/aclocal/libtool.m4'
libtoolize: `/usr/share/aclocal/ltoptions.m4'
libtoolize: `/usr/share/aclocal/ltversion.m4'
libtoolize: `/usr/share/aclocal/ltsugar.m4'
libtoolize: `/usr/share/aclocal/lt~obsolete.m4'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.in and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
Code: Select all
$ cat /usr/share/aclocal/libtool.m4 > aclocal.m4
$ cat /usr/share/aclocal/ltoptions.m4 >> aclocal.m4
$ cat /usr/share/aclocal/ltversion.m4 >> aclocal.m4
$ cat /usr/share/aclocal/ltsugar.m4 >> aclocal.m4
$ cat /usr/share/aclocal/lt~obsolete.m4 >> aclocal.m4
Code: Select all
$ libtoolize
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: linking file `m4/libtool.m4'
libtoolize: linking file `m4/ltoptions.m4'
libtoolize: linking file `m4/ltsugar.m4'
libtoolize: linking file `m4/ltversion.m4'
libtoolize: linking file `m4/lt~obsolete.m4'
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
Re-run autoconf, which finishes without further comments, and ./configure yields:
Code: Select all
$ autoconf
$ ./configure
checking whether make sets $(MAKE)... yes
configure: error: cannot run /bin/bash builds/make.new/config/config.sub
Code: Select all
$ ls -la ./builds/make.new/config/
total 268
drwxr-xr-x 2 stan users 4096 01-26 20:41 .
drwxr-xr-x 3 stan users 4096 2009-10-07 ..
-rw-r--r-- 1 stan users 4115 2006-11-05 config.h.in
-rw-r--r-- 1 stan users 5561 2003-07-06 install-sh
-rwxr-xr-x 1 stan users 243455 01-26 20:41 ltmain.sh
Re: Ancient Firebird on B3
One more thing I tried just now:
And in case anyone's curious:
Code: Select all
$ autoreconf
autoheader2.50: warning: missing template: DARWIN
autoheader2.50: Use AC_DEFINE([DARWIN], [], [Description])
autoheader2.50: warning: missing template: DOUBLE_ALIGN
autoheader2.50: warning: missing template: FB_ALIGNMENT
autoheader2.50: warning: missing template: FB_IPC_NAME
autoheader2.50: warning: missing template: FB_PIPE_NAME
autoheader2.50: warning: missing template: FB_PREFIX
autoheader2.50: warning: missing template: FB_SERVICE_NAME
autoheader2.50: warning: missing template: FB_SERVICE_PORT
autoheader2.50: warning: missing template: FREEBSD
autoheader2.50: warning: missing template: GETMNTENT_TAKES_TWO_ARGUMENTS
autoheader2.50: warning: missing template: GETTIMEOFDAY_RETURNS_TIMEZONE
autoheader2.50: warning: missing template: GPRE_ADA
autoheader2.50: warning: missing template: GPRE_COBOL
autoheader2.50: warning: missing template: GPRE_FORTRAN
autoheader2.50: warning: missing template: GPRE_PASCAL
autoheader2.50: warning: missing template: HAVE_EDITLINE_H
autoheader2.50: warning: missing template: HPUX
autoheader2.50: warning: missing template: MANAGER_PROCESS
autoheader2.50: warning: missing template: NETBSD
autoheader2.50: warning: missing template: PowerPC
autoheader2.50: warning: missing template: SINIXZ
autoheader2.50: warning: missing template: SOLARIS
autoheader2.50: warning: missing template: SUPPORT_RAW_DEVICES
autoheader2.50: warning: missing template: WIN_NT
autoheader2.50: warning: missing template: solx86
autoreconf2.50: /usr/bin/autoheader failed with exit status: 1
Code: Select all
$ gcc -v
Using built-in specs.
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-sjlj-exceptions --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi
Thread model: posix
gcc version 4.4.5 (Debian 4.4.5-8)
Re: Ancient Firebird on B3
If I understand the the output, you seem to be using the darwin template, which is BSD. Why not try the linux 686 version? Is that enforceable?
Re: Ancient Firebird on B3
You should try to download config.guess and config.sub in the directory where they're supposed to be :
Code: Select all
wget -O builds/make.new/config/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD'
wget -O builds/make.new/config/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD'
Re: Ancient Firebird on B3
Do you think it would be that simple ? The gcc version on squeeze is actually too recent to build this old version of firebird. You need to compile an 3.x version of gcc on the B3 and compile firebird with that. I just tested on a virtual i386 squeeze and it did the job. I suppose it would work on the B3 but compilation times will be higher. Here is a quick-and-dirty procedure :
- Download gcc-3.4.6.tar.bz2, gcc-core-3.4.6.tar.bz2 and gcc-g++-3.4.6.tar.bz2 from your favorite GNU mirror.
- Extract all these tarballs in the same directory and do the gcc compilation and installation (Prepare yourself some coffee) :
Code: Select all
cd gcc-3.4.6 mkdir -v ../gcc-build cd ../gcc-build ../gcc-3.4.6/configure --prefix=/opt/gcc-3.4.6 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ make make install
- Extract the firebird-1.5.6.5026.tar.bz2 and run these commands to compile and install:
Code: Select all
apt-get install bison cd firebird-1.5.6.5026/ wget -O builds/make.new/config/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' wget -O builds/make.new/config/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' export CC=/opt/gcc-3.4.6/bin/gcc export CXX=/opt/gcc-3.4.6/bin/g++ export CPP=/opt/gcc-3.4.6/bin/cpp ./autogen.sh ./configure --prefix=<your prefix choice> make make install
Re: Ancient Firebird on B3
Hi MouettE,
How do you _know_ those things? O_O Did you just checked FB release date and used GCC from around that timeframe, or is there something else that told you this?
Anyway, I feel I'm getting closer, first step worked fine (I think?):
The next, not so much:
I found this thread: http://lists.cs.uiuc.edu/pipermail/llvm ... 07833.html, but I barely understand the dev-speak there; does this mean I should try a bit newer GCC version, with LLVM including the patch he's talking about?
How do you _know_ those things? O_O Did you just checked FB release date and used GCC from around that timeframe, or is there something else that told you this?
Anyway, I feel I'm getting closer, first step worked fine (I think?):
Code: Select all
../gcc-3.4.6/configure --prefix=/opt/gcc-3.4.6 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++
creating cache ./config.cache
checking host system type... armv5tel-unknown-linux-gnu
checking target system type... armv5tel-unknown-linux-gnu
checking build system type... armv5tel-unknown-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
*** This configuration is not supported in the following subdirectories:
target-libf2c target-libffi target-boehm-gc target-zlib target-libjava zlib fastjar target-libobjc
(Any other directories should still work fine.)
checking for armv5tel-unknown-linux-gnu-ar... no
checking for ar... ar
checking for armv5tel-unknown-linux-gnu-as... no
checking for as... as
checking for armv5tel-unknown-linux-gnu-dlltool... no
checking for dlltool... dlltool
checking for armv5tel-unknown-linux-gnu-ld... no
checking for ld... ld
checking for armv5tel-unknown-linux-gnu-nm... no
checking for nm... nm
checking for armv5tel-unknown-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for armv5tel-unknown-linux-gnu-windres... no
checking for windres... windres
checking for armv5tel-unknown-linux-gnu-objcopy... no
checking for objcopy... objcopy
checking for armv5tel-unknown-linux-gnu-objdump... no
checking for objdump... objdump
checking for armv5tel-unknown-linux-gnu-ar... no
checking for ar... ar
checking for armv5tel-unknown-linux-gnu-as... no
checking for as... as
checking for armv5tel-unknown-linux-gnu-dlltool... no
checking for dlltool... dlltool
checking for armv5tel-unknown-linux-gnu-ld... no
checking for ld... ld
checking for armv5tel-unknown-linux-gnu-nm... no
checking for nm... nm
checking for armv5tel-unknown-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for armv5tel-unknown-linux-gnu-windres... no
checking for windres... windres
checking whether to enable maintainer-specific portions of Makefiles... no
updating cache ./config.cache
creating ./config.status
creating Makefile
Code: Select all
$ make
(...)
/home/stan/gcc-build/gcc/xgcc -B/home/stan/gcc-build/gcc/ -B/opt/gcc-3.4.6/armv5tel-unknown-linux-gnu/bin/ -B/opt/gcc-3.4.6/armv5tel-unknown-linux-gnu/lib/ -isystem /opt/gcc-3.4.6/armv5tel-unknown-linux-gnu/include -isystem /opt/gcc-3.4.6/armv5tel-unknown-linux-gnu/sys-include -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fomit-frame-pointer -fPIC -g0 -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../gcc-3.4.6/gcc -I../../gcc-3.4.6/gcc/. -I../..gcc-3.4.6/gcc/../include -DL_udivsi3 -xassembler-with-cpp -c ../../gcc-3.4.6/gcc/config/arm/lib1funcs.asm -o libgcc/./_udivsi3.o
( nm -pg libgcc/./_udivsi3.o | mawk 'NF == 3 && $2 !~ /^[UN]$/ { print " .hidden", $3 }'; cat libgcc//stacknote.s ) | /home/stan/gcc-build/gcc/xgcc -B/home/stan/gcc-build/gcc/ -B/opt/gcc-3.4.6/armv5tel-unknown-linux-gnu/bin/ -B/opt/gcc-3.4.6/armv5tel-unknown-linux-gnu/lib/ -isystem /opt/gcc-3.4.6/armv5tel-unknown-linux-gnu/include -isystem /opt/gcc-3.4.6/armv5tel-unknown-linux-gnu/sys-include -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fomit-frame-pointer -fPIC -g0 -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -r
-nostdinc -nostdlib -o libgcc/./_udivsi3.oS libgcc/./_udivsi3.o -xassembler -
/usr/bin/ld: unrecognised emulation mode: armelf_linux
Supported emulations: armelf_linux_eabi armelfb_linux_eabi
collect2: ld returned 1 exit status
make[2]: *** [libgcc/./_udivsi3.oS] Error 1
make[2]: Leaving directory `/home/stan/gcc-build/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/home/stan/gcc-build/gcc'
make: *** [all-gcc] Error 2
Re: Ancient Firebird on B3
I'm no kernel hacker or anything close, but could it be that your have the wrong chipset? Theres a lot of variation in these ARM processors (litle endian / big endian for example).
EABI is here: http://en.wikipedia.org/wiki/Applicatio ... _interface
the processor in the B3 is a kirkwood. Not even sure if thats even related to the problem.
hope this is any help
EABI is here: http://en.wikipedia.org/wiki/Applicatio ... _interface
the processor in the B3 is a kirkwood. Not even sure if thats even related to the problem.
hope this is any help
Re: Ancient Firebird on B3
Well, right now I'm compiling GCC, and I haven't specified the architecture anywhere, really...
Re: Ancient Firebird on B3
I'm looking into it right now directly on a b3, but compilation times are soooo sllooooww ...
Re: Ancient Firebird on B3
Yeah, it took few dozen minutes to reach this stage. If you need, I have full logs?
Re: Ancient Firebird on B3
I have mine now so it's OK !stasheck wrote:Yeah, it took few dozen minutes to reach this stage. If you need, I have full logs?