Opened 7 years ago

Closed 7 years ago

Last modified 23 months ago

#6344 closed defect (fixed)

1.6.0: FTBFS on [kFreeBSD,Hurd]

Reported by: SF/ownerless Owned by: fuzzie
Priority: normal Component: Port: BSD
Keywords: build Cc:
Game:

Description

Starting with version 1.6.0 ScummVM FTBFS on kFreeBSD and GNU Hurd with "undefined reference" errors.

See more in the following build logs:

https://buildd.debian.org/status/fetch.php?pkg=scummvm&arch=hurd-i386&ver=1.6.0%2Bdfsg-1&stamp=1370195444 https://buildd.debian.org/status/fetch.php?pkg=scummvm&arch=kfreebsd-i386&ver=1.6.0%2Bdfsg-1&stamp=1370194083 https://buildd.debian.org/status/fetch.php?pkg=scummvm&arch=kfreebsd-amd64&ver=1.6.0%2Bdfsg-1&stamp=1370192434

Ticket imported from: #3614268. Ticket imported from: bugs/6344.

Attachments (2)

hurd+kfreebsd.patch (1.2 KB ) - added by SF/ownerless 7 years ago.
basic configure support for GNU Hurd and kFreeBSD
posix.patch (614 bytes ) - added by SF/ownerless 7 years ago.
fix for FTBFS in timidity on GNU Hurd

Download all attachments as: .zip

Change History (16)

comment:1 by fuzzie, 7 years ago

Best guess: host types of kfreebsd- and hurd- aren't supported by our configure (which means you don't get a main() due to POSIX not getting set, for example), and for some reason we don't error out.

comment:2 by SF/ownerless, 7 years ago

If it is `configure` script I can't quite identify the change since 1.5.0 that might be responsible for this. 1.5.0 was building just fine but 1.6.0 is failing to build somewhere in new engines as far as I understand....

comment:3 by fuzzie, 7 years ago

Do you know if 1.5.0 actually worked on any of these platforms? I did remove the fallback main() in 1.6.0, because it produced invalid binaries (they would crash at startup).

comment:4 by fuzzie, 7 years ago

Owner: set to fuzzie

comment:5 by SF/ownerless, 7 years ago

Hmm, you're right, I've just tried scummvm-1.5.0 on Hurd and kfreebsd-i386 and got the following error on start:

scummvm: common/system.cpp:130: virtual FilesystemFactory* OSystem::getFilesystemFactory(): Assertion `_fsFactory' failed.

Just as you've said perhaps ScummVM was never working on those platforms even though it was building. Thanks.

by SF/ownerless, 7 years ago

Attachment: hurd+kfreebsd.patch added

basic configure support for GNU Hurd and kFreeBSD

comment:6 by SF/ownerless, 7 years ago

With the attached patch I was able to build ScummVM successfully on kFreeBSD (with --disable-alsa) and on GNU Hurd (with --disable-alsa --disable-timidity). I was able to run ScummVM on both platforms.

Just to note that without --disable-timidity Hurd FTBFS:

backends/midi/timidity.cpp: In member function ‘virtual int MidiDriver_TIMIDITY::open()’: backends/midi/timidity.cpp:151:21: error: ‘MAXHOSTNAMELEN’ was not declared in this scope backends/midi/timidity.cpp:161:19: error: ‘timidity_host’ was not declared in this scope backends/midi/timidity.cpp:163:19: error: ‘timidity_host’ was not declared in this scope backends/midi/timidity.cpp:166:21: error: ‘timidity_host’ was not declared in this scope backends/midi/timidity.cpp:176:39: error: ‘timidity_host’ was not declared in this scope backends/midi/timidity.cpp:185:72: error: ‘timidity_host’ was not declared in this scope backends/midi/timidity.cpp:218:36: error: ‘timidity_host’ was not declared in this scope backends/midi/timidity.cpp:228:66: error: ‘timidity_host’ was not declared in this scope make[2] *** [backends/midi/timidity.o] Error 1

I filed the following pull request:

https://github.com/scummvm/scummvm/pull/338

comment:7 by digitall, 7 years ago

ownerless: Thank you for the patch and pull request. This has now been merged.

However, it should not be necessary to pass --disable-alsa or --disable-timidity explicitly as they should autodetect by tests in the configure script. If you could take a look at these tests, and see why they are failing to auto-detect that your platform lacks support for ALSA / timidity, then that would be good... Worst case, we can add a forced disable for these hosts, but the more optimal solution would be to fix the tests.

comment:8 by SF/ownerless, 7 years ago

Thank you for merging.

I'm not yet familiar with tests so I just wanted to share something that made build possible to begin with. Indeed there is a potential for improvements.

Alsa is not available on non-linux platforms so override (instead of check) might be OK.

As for --disable-timidity on Hurd I don't really understand why it is needed: timidity library is there so in theory it could work if someone understands how to fix it and how to write functional test for `configure`. Thanks.

comment:9 by wjp, 7 years ago

The errors you already copy-pasted below show that timidity itself may not be the problem but rather the constant MAXHOSTNAMELEN.

comment:10 by SF/ownerless, 7 years ago

Right, lack of MAXHOSTNAMELEN is a notorious cause for FTBFS on GNU Hurd. I had a look at similar cases and produced a trivial fix for this, see attached "posix.patch". Using this patch I successfully built ScummVM-1.6.0 on Hurd without --disable-timidity. Not only it builds but works as well. :)

by SF/ownerless, 7 years ago

Attachment: posix.patch added

fix for FTBFS in timidity on GNU Hurd

comment:11 by bluegr, 7 years ago

Resolution: fixed
Status: newclosed

comment:12 by bluegr, 7 years ago

The first patch for configure support has been merged into master.

There is a pull request for the second patch (for MAXHOSTNAMELEN tp NI_MAXHOST) here: https://github.com/scummvm/scummvm/pull/339

So I'm closing this bug, as it's obsolete now

comment:13 by digitall, 23 months ago

Component: Ports

comment:14 by digitall, 23 months ago

Component: PortsPort: BSD
Note: See TracTickets for help on using tickets.