Opened 20 years ago

Closed 20 years ago

Last modified 6 years ago

#1842 closed defect (fixed)

ALL: Linkage errors of backends/ and sound/

Reported by: salty-horse Owned by: fingolfin
Priority: normal Component: Port: Win32
Version: Keywords:
Cc: Game:

Description

Ever since the MidiDriver relocation from backends/ to sound/ on 2004-12-01 22:33, the linkage process outputs errors on missing midi symbols. Some test-cases follow.

When building: 1) the entire project, with all engines: Linkage OK. 2) only SCUMM or only queen: Linkage Bad. 3) SCUMM + sky: Linkage OK.

Related files: Makefile.common base/gameDetector.cpp base/gameDetector.h gui/options.cpp queen/queen.cpp saga/saga.cpp scumm/scumm.cpp simon/simon.cpp sky/sky.cpp sound/mididrv.cpp sound/mididrv.h

Ticket imported from: #1083058. Ticket imported from: bugs/1842.

Change History (18)

comment:1 by fingolfin, 20 years ago

To process your bug report appropriately, we need you to provide the following additional information:

* ScummVM version (PLEASE test the latest CVS/Daily build) * Bug details, including instructions on reproducing it * Language of game (English, German, ...) * Version of game (talkie, floppy, ...) * Platform and Compiler (Win32, Linux, MacOS, ...) * Attach a save game if possible * If this bug only occurred recently, please note the last version without the bug, and the first version including the bug. That way we can fix it quicker by looking at the changes made.

This should only take you a little time but will make it much easier for us to process your bug report in a way that satisfies both you and us.

Thank you for your support!

comment:2 by fingolfin, 20 years ago

W/o knowing anything about your OS and the used compiler / linker, it's impossible to say anything about the problem you are seeing.

comment:3 by fingolfin, 20 years ago

Component: --Unset--
Owner: set to fingolfin
Status: newpending
Summary: Linkage errors of backends/ and sound/ALL: Linkage errors of backends/ and sound/

comment:4 by salty-horse, 20 years ago

Status: pendingnew

comment:5 by salty-horse, 20 years ago

My bad: I'm using mingw's gcc 3.4.2 It has been confirmed with several people already

comment:6 by fingolfin, 20 years ago

... and the error message is... ?

comment:7 by wjp, 20 years ago

I'll add some details (copy-pasted from what I said a few days ago in #scummvm)

Build will fail even if you only disable sky, it seems. The reason is that sky is the only engine that calls YM3812UpdateOne and makeAdlibOPL.

It's a bit of an annoying 'feature' of the linker. sky is listed before libsound.a, so when it reaches libsound.a, it includes the object containing those two functions since sky needs them. However, libbackends.a needs them as well, but libbackends.a is only listed after libsound.a.

Possible solution for GNU ld would be listing libsound.a twice on the link line; once before libbackends.a and once behind it. Don't know how other linkers would react to having an archive listed multiple times.

comment:8 by fingolfin, 20 years ago

Priority: normalhigh

comment:9 by fingolfin, 20 years ago

Resolution: fixed
Status: newclosed

comment:10 by fingolfin, 20 years ago

I put a workaround into CVS, moving one MidiDrv method to base/ main.cpp (which ist still quite ugly, but works sufficiently well).

comment:11 by joostp, 20 years ago

Opening this again since it has not yet been fully resolved. Building ScummVM (on OSX) with just BASS gives me these linker errors:

ld: Undefined symbols: MidiDriver_MPU401::allocateChannel() MidiDriver_MPU401::setTimerCallback(void*, void (*)(void*)) MidiDriver_MPU401::close() MidiDriver_MPU401::property(int, unsigned) MidiDriver_MPU401::MidiDriver_MPU401[not-in-charge]() [...]

comment:12 by joostp, 20 years ago

Resolution: fixed
Status: closednew

comment:13 by fingolfin, 20 years ago

Priority: highnormal

comment:14 by fingolfin, 20 years ago

Owner: fingolfin removed

comment:15 by fingolfin, 20 years ago

IMO, the only good wayto fix all of those fully is to move the softsynth (=portable) midi drivers from backends/ to sound/ or a subdir thereof (there's no reason for them to be in the backends/ hierarchy anyway).

comment:16 by fingolfin, 20 years ago

To elaborate a bit, I think that we should move the following files and directories from backends/mid to a new dir sound/mididrivers or sound/softsynth or something like that:

adlib.cpp emumidi.h mt32/ mt32.cpp ym2612.cpp

I don't to do that while we are in the middle of a release process; I don't think that the problem is severe enough to warrant such a big last minute changed.

comment:17 by fingolfin, 20 years ago

Owner: set to fingolfin
Resolution: fixed
Status: newclosed

comment:18 by digitall, 6 years ago

Component: --Unset--Port: Win32
Note: See TracTickets for help on using tickets.