Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port for Linux/m68k [CORE3637] #3988

Closed
firebird-issue-importer opened this issue Oct 15, 2011 · 16 comments
Closed

Port for Linux/m68k [CORE3637] #3988

firebird-issue-importer opened this issue Oct 15, 2011 · 16 comments

Comments

@firebird-issue-importer

Submitted by: Thorsten Glaser (mirabilos)

Attachments:
port-m68k.patch

Votes: 1

Make Fb run on more HW platforms

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Oct 15, 2011

Commented by: Thorsten Glaser (mirabilos)

I'm preparing a patch to make Fb 2.5 compile on Debian/m68k. Will attach it here, then.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Oct 15, 2011

Commented by: Thorsten Glaser (mirabilos)

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.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Oct 15, 2011

Commented by: Thorsten Glaser (mirabilos)

patch to get it compile without errors, based on the patch for alpha/hppa

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Oct 15, 2011

Modified by: Thorsten Glaser (mirabilos)

Attachment: port-m68k.patch [ 12021 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Oct 17, 2011

Commented by: @AlexPeshkoff

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:-)

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Oct 18, 2011

Commented by: Thorsten Glaser (mirabilos)

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.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Apr 11, 2013

Modified by: @dyemanov

Fix Version: 3.0 Beta 1 [ 10332 ]

Fix Version: 3.0 Alpha 1 [ 10331 ] =>

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Apr 24, 2014

Modified by: @dyemanov

Fix Version: 3.0 Beta 2 [ 10586 ]

Fix Version: 3.0 Beta 1 [ 10332 ] =>

Fix Version: 2.5.1 [ 10333 ] =>

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 18, 2015

Modified by: @dyemanov

Fix Version: 3.0 RC 1 [ 10584 ]

Fix Version: 3.0 Beta 2 [ 10586 ] =>

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 6, 2015

Commented by: @AlexPeshkoff

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.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 6, 2015

Modified by: @AlexPeshkoff

Fix Version: 3.0 RC 1 [ 10584 ] =>

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Oct 14, 2016

Commented by: @mariuz

Fixed by this pull requests

#51

and

#52

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Oct 17, 2016

Commented by: @AlexPeshkoff

Fixed by pull request from Debian

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Oct 17, 2016

Modified by: @AlexPeshkoff

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 4.0 Alpha 1 [ 10731 ]

Fix Version: 3.0.2 [ 10785 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Oct 17, 2016

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: Cannot be tested

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Oct 17, 2016

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants