Issue Details (XML | Word | Printable)

Key: CORE-3637
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Peshkov
Reporter: Thorsten Glaser
Votes: 1
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Port for Linux/m68k

Created: 14/Oct/11 09:45 PM   Updated: 17/Oct/16 12:04 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 3.0.2, 4.0 Alpha 1

File Attachments: 1. Text File port-m68k.patch (5 kB)


QA Status: Cannot be tested


 Description  « Hide
Make Fb run on more HW platforms

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Thorsten Glaser added a comment - 14/Oct/11 09:46 PM
I'm preparing a patch to make Fb 2.5 compile on Debian/m68k. Will attach it here, then.

Thorsten Glaser added a comment - 15/Oct/11 11:23 AM
With the attached port-m68k.patch file, compilation goes pretty well, until:

[...]
touch boot_phase1_build.stamp
make[4]: Leaving directory `/tmp/buildd/firebird2.5-2.5.1.26349-0~rc1.ds4/gen'
/usr/bin/make -f ../gen/Makefile.static.createdb
make[4]: Entering directory `/tmp/buildd/firebird2.5-2.5.1.26349-0~rc1.ds4/gen'
g++ -ggdb -O3 -DNDEBUG -DLINUX -pipe -MMD -fPIC -DFB_SEND_FLAGS=MSG_NOSIGNAL -I../src/include/gen -I../src/include -I../src/vulcan -DNAMESPACE=Vulcan -pthread -DBOOT_BUILD -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fno-rtti -c ../src/utilities/create_db.cpp -o ../temp/boot/utilities/create_db.o
g++ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -pthread ../temp/boot/utilities/create_db.o ../temp/boot/common/classes/alloc.o ../temp/boot/common/classes/locks.o ../temp/boot/common/classes/semaphore.o ../temp/boot/common/classes/fb_string.o ../temp/boot/common/classes/timestamp.o ../temp/boot/common/classes/PublicHandle.o ../temp/boot/common/classes/TempFile.o ../temp/boot/common/classes/UserBlob.o ../temp/boot/common/classes/SafeArg.o ../temp/boot/common/classes/MsgPrint.o ../temp/boot/common/classes/BaseStream.o ../temp/boot/common/fb_exception.o ../temp/boot/common/thd.o ../temp/boot/common/classes/MetaName.o ../temp/boot/common/StatusHolder.o ../temp/boot/common/classes/init.o ../temp/boot/common/StatusArg.o ../temp/boot/common/utils.o ../temp/boot/config/AdminException.o ../temp/boot/config/Args.o ../temp/boot/config/ArgsException.o ../temp/boot/config/ConfObj.o ../temp/boot/config/ConfObject.o ../temp/boot/config/ConfigFile.o ../temp/boot/config/Configuration.o ../temp/boot/config/Element.o ../temp/boot/config/FileName.o ../temp/boot/config/InputFile.o ../temp/boot/config/InputStream.o ../temp/boot/config/Lex.o ../temp/boot/config/ScanDir.o ../temp/boot/config/Stream.o ../temp/boot/config/StreamSegment.o ../temp/boot/vulcan/PathName.o ../temp/boot/vulcan/RefObject.o ../gen/firebird/lib/libfbstatic.a -o ../gen/firebird/bin/create_db -L../gen/firebird/lib -latomic_ops -lm -ldl -latomic_ops -licuuc
make[4]: Leaving directory `/tmp/buildd/firebird2.5-2.5.1.26349-0~rc1.ds4/gen'
/usr/bin/make -f ../gen/Makefile.refDatabases empty_db
make[4]: Entering directory `/tmp/buildd/firebird2.5-2.5.1.26349-0~rc1.ds4/gen'
/usr/bin/make -f ../gen/Makefile.static.createdb
make[5]: Entering directory `/tmp/buildd/firebird2.5-2.5.1.26349-0~rc1.ds4/gen'
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory `/tmp/buildd/firebird2.5-2.5.1.26349-0~rc1.ds4/gen'
rm -f empty.fdb
../gen/firebird/bin/create_db empty.fdb
make[4]: *** [empty.fdb] Segmentation fault
make[4]: *** Deleting file `empty.fdb'
make[4]: Leaving directory `/tmp/buildd/firebird2.5-2.5.1.26349-0~rc1.ds4/gen'
make[3]: *** [empty_db] Error 2
make[3]: Leaving directory `/tmp/buildd/firebird2.5-2.5.1.26349-0~rc1.ds4/gen'
make[2]: *** [firebird] Error 2
make[2]: Leaving directory `/tmp/buildd/firebird2.5-2.5.1.26349-0~rc1.ds4'
make[1]: *** [build-super-stamp] Error 2
make[1]: Leaving directory `/tmp/buildd/firebird2.5-2.5.1.26349-0~rc1.ds4'
make: *** [build-super-and-classic] Error 2

If I call create_db manually, I get:
terminate called after throwing an instance of 'Firebird::system_call_failed'
Aborted

Trying to get a backtrace in gdb yields:
Reading symbols from /tmp/buildd/firebird2.5-2.5.1.26349-0~rc1.ds4/gen/firebird/bin/create_db...done.
(gdb) r
Starting program: /tmp/buildd/firebird2.5-2.5.1.26349-0~rc1.ds4/gen/firebird/bin/create_db empty.fdb
[Thread debugging using libthread_db enabled]
[New Thread 0xc1a1a4a0 (LWP 13907)]
Cannot find user-level thread for LWP 13900: capability not available
(gdb) c
Continuing.
Cannot execute this command while the selected thread is running.

I've got no skills in the areas of either C++ or pthreads, so this is out of my depth. I'd appreciate if someone could look after this, as it's a build-dependency of php5. You can get a test VM at https://wiki.debian.org/Aranym/Quick which yields a virtual ~200-400 MHz m68k machine on a 3 GHz AMD system, i.e. pretty fast. The emulation, except for the FPU, is said to be accurate, enough to be allowed to build official debian-ports packages.

Thorsten Glaser added a comment - 15/Oct/11 11:23 AM
patch to get it compile without errors, based on the patch for alpha/hppa

Alexander Peshkov added a comment - 17/Oct/11 01:15 PM
The fact that create_db was created does not mean that firebird compiles successfully. This is just the first step, and yes - segfaults in create_db are typical for new port.

I use gentoo and have problems with aranym.

--------------------------
# emerge aranym
Calculating dependencies... done!

!!! All ebuilds that could satisfy "aranym" have been masked.
!!! One of the following masked packages is required to complete your request:
- app-emulation/aranym-0.9.10 (masked by: ~amd64 keyword)
- app-emulation/aranym-0.9.9 (masked by: ~amd64 keyword)

For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.
--------------------------

Please try to build fireburd with core-files enabled. Probably gdb can show bt from it... If not - I can hardly do something on such broken toolchain.

PS. What is the need for port for such ancient beast? I remember we had 68k port in firebird 1, but it was cleaned up... Luckily you are not going to port to PDP-11:-)

Thorsten Glaser added a comment - 18/Oct/11 04:47 PM
The port is needed because in Debian, php5 build-depends on firebird2.5 (to build the extension module). I'm asking them to skip that module on this platform, though. No idea whether they do it - while the server may not be used on it (or may... I know of people who would do that), the client probably can. And having less differences between architectures is usually a good thing, too...

As for the build issues, you'd best talk with the Debian maintainers about it, I don't know half of what you're talking about ;-)

Same for Gentoo... I think you need to "unmask" the package locally, but I don't really know about these things either.

Alexander Peshkov added a comment - 06/Jul/15 11:00 AM
This is from https://en.wikipedia.org/wiki/Motorola_68000_series

**********************
The Motorola 680x0/m68000/68000/m68k/68k series is a family of 32-bit CISC microprocessors. During the 1980s and early 1990s, they were popular in personal computers and workstations and were the primary competitors of Intel's x86 microprocessors. They were most well known as the processors powering the early Apple Macintosh, the Commodore Amiga, the Sinclair QL, the Atari ST, the WeatherStar, the Sega Mega Drive/Genesis, and several others. Although no modern desktop computers are based on the 68000, derivative processors are still widely used in embedded applications.

Motorola ceased development of the 68000 series architecture in 1994 replacing it with the development of the PowerPC architecture...
**********************

I think we have more actual things to do then try to support >20 years ago deprecated CPU.


Alexander Peshkov added a comment - 17/Oct/16 09:23 AM
Fixed by pull request from Debian