Opened 3 months ago

Last modified 5 days ago

#69113 new defect

FileZilla fails to launch: Fatal Error: Mismatch between the program and library build versions detected

Reported by: barracuda156 Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: tiger, leopard, snowleopard, powerpc Cc: lhaeger (Lothar Haeger), sideeffect42 (Dennis Camera)
Port: FileZilla

Description

Unfortunately I still cannot check on 10.5.8 (need to rebuild a zoo of new gccs), but on my 10.6, while both library and app build from existing portfiles with no patching or custom settings, launching the app fails.

I have seen this mismatch errors with some other cases of WxWidgets ports. (And malloc thing is very familiar perhaps to anyone with PPC. Could be fixed by legacysupport redirect_bins.)

36-246% /Applications/MacPorts/FileZilla.app/Contents/MacOS/filezilla 
filezilla(5553) malloc: *** error for object 0x3a68034: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
filezilla(5553) malloc: *** error for object 0x3a680a4: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Fatal Error: Mismatch between the program and library build versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1017,wx containers,compatible with 2.8),
and your program used 3.0 (wchar_t,compiler with C++ ABI 1018,wx containers,compatible with 2.8).

Versions installed:

36-246% port -v installed libfilezilla | grep active
  libfilezilla @0.45.0_0 (active) requested_variants='' platform='darwin 10' archs='ppc' date='2024-01-16T15:21:40+0800'
36-246% port -v installed FileZilla | grep active
  FileZilla @3.66.4_0 (active) requested_variants='' platform='darwin 10' archs='ppc' date='2024-01-16T16:11:48+0800'
  1. S. If it is confirmed that the app actually builds and works fine on Leopard PPC, this can be closed.

(Usually such failures are common to 10.5 and 10.6.)

Change History (6)

comment:1 Changed 3 months ago by sideeffect42 (Dennis Camera)

Interesting. The C++ ABI seems to differ. Checking the Portfiles I see that FileZilla has a block for old Clang versions while libfilezilla has not.

Since you are building on 10.6, could it be that libfilezilla was compiled with a different compiler than FileZilla?

P.S. If it is confirmed that the app actually builds and works fine on Leopard PPC, this can be closed.

In fact, no, it does not build on PPC. There is still a linker error, cf. https://github.com/macports/macports-ports/pull/22152.
But given the comments I received on said PR and my schedule being busy currently, I understand that fixing FileZilla for old Mac OS X is not desired in MacPorts and I am not going to try to invest the time necessary to debug the linker error and rewriting the drag&drop code.

comment:2 Changed 3 months ago by kencu (Ken)

it is desired, but just not desired enough for another 9 month delay in updating the port.

So barracuda gets no linker errors, but libfilezilla is linked to a different wxWidgets installation?

otool should tell you.

comment:3 in reply to:  2 Changed 3 months ago by barracuda156

Replying to kencu:

it is desired, but just not desired enough for another 9 month delay in updating the port.

Yes, of course, there was no need here to wait for PPC fixes.

So barracuda gets no linker errors, but libfilezilla is linked to a different wxWidgets installation?

Looks like libfilezilla installs its lib into prefix, while FileZilla installs a dupe into its app dir:

svacchanda$ otool -L /Applications/MacPorts/FileZilla.app/Contents/Frameworks/libfilezilla.41.dylib
/Applications/MacPorts/FileZilla.app/Contents/Frameworks/libfilezilla.41.dylib:
	libfilezilla.41.dylib (compatibility version 42.0.0, current version 42.0.0)
	@executable_path/../Frameworks/libatomic.1.dylib (compatibility version 4.0.0, current version 4.0.0)
	@executable_path/../Frameworks/libMacportsLegacySupport.dylib (compatibility version 1.0.0, current version 1.1.99)
	@executable_path/../Frameworks/libiconv.2.dylib (compatibility version 9.0.0, current version 9.1.0)
	@executable_path/../Frameworks/libgnutls.30.dylib (compatibility version 68.0.0, current version 68.0.0)
	@executable_path/../Frameworks/libnettle.8.8.dylib (compatibility version 8.0.0, current version 8.8.0)
	@executable_path/../Frameworks/libhogweed.6.8.dylib (compatibility version 6.0.0, current version 6.8.0)
	@executable_path/../Frameworks/libgmp.10.dylib (compatibility version 16.0.0, current version 16.0.0)
	@executable_path/../Frameworks/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.32.0)
	/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 41.0.0)
	/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 34772.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 511.1.0)
	@executable_path/../Frameworks/libgcc_s.1.1.dylib (compatibility version 1.0.0, current version 1.1.0)
	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 117.0.0)
svacchanda$ otool -L /opt/local/lib/libfilezilla.41.dylib
/opt/local/lib/libfilezilla.41.dylib:
	/opt/local/lib/libfilezilla.41.dylib (compatibility version 42.0.0, current version 42.0.0)
	/opt/local/lib/libgcc/libatomic.1.dylib (compatibility version 4.0.0, current version 4.0.0)
	/opt/local/lib/libMacportsLegacySupport.dylib (compatibility version 1.0.0, current version 1.1.99)
	/opt/local/lib/libiconv.2.dylib (compatibility version 9.0.0, current version 9.1.0)
	/opt/local/lib/libgnutls.30.dylib (compatibility version 68.0.0, current version 68.0.0)
	/opt/local/lib/libnettle.8.dylib (compatibility version 8.0.0, current version 8.8.0)
	/opt/local/lib/libhogweed.6.dylib (compatibility version 6.0.0, current version 6.8.0)
	/opt/local/lib/libgmp.10.dylib (compatibility version 16.0.0, current version 16.0.0)
	/opt/local/lib/libgcc/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.32.0)
	/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 41.0.0)
	/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 34772.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 511.1.0)
	/opt/local/lib/libgcc/libgcc_s.1.1.dylib (compatibility version 1.0.0, current version 1.1.0)
	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 117.0.0)

Is this something intended?

  1. S. Here is the crash log btw:
    Thread 0 Crashed:
    0   libSystem.B.dylib             	0x01731d48 __kill + 12
    1   libSystem.B.dylib             	0x017d5808 abort + 116
    2   libwx_baseu-3.0.0.5.0.dylib   	0x00fbc8f0 wxLog::OnLog(unsigned long, wxString const&, wxLogRecordInfo const&) + 88
    3   libwx_baseu-3.0.0.5.0.dylib   	0x00fb994c wxLogger::DoLog(wchar_t const*, ...) + 92
    4   libwx_baseu-3.0.0.5.0.dylib   	0x00fc9184 wxAppConsoleBase::CheckBuildOptions(char const*, char const*) + 528
    5   ...filezilla-project.filezilla	0x0004e10c wxCreateApp() + 40
    6   libwx_baseu-3.0.0.5.0.dylib   	0x0100d608 wxEntryStart(int&, wchar_t**) + 128
    7   libwx_baseu-3.0.0.5.0.dylib   	0x0100d9d4 wxInitialize(int, wchar_t**) + 80
    8   libwx_baseu-3.0.0.5.0.dylib   	0x0100da24 wxEntry(int&, wchar_t**) + 28
    9   ...filezilla-project.filezilla	0x001b98bc main + 24
    10  ...filezilla-project.filezilla	0x0000c758 start + 64
    

comment:4 Changed 3 months ago by kencu (Ken)

It looks like the FileZilla installation needs some work.

The versioning of some of the libraries and the IDs look wrong.

The FileZilla build script is copying all the libraries into it's application bundle, but this is not right for macports.

Somebody will have to sit down and sort all this out properly.

Last edited 3 months ago by kencu (Ken) (previous) (diff)

comment:5 Changed 3 months ago by kencu (Ken)

the first, and most important, thing to do is to make sure FileZilla knows which libfilezilla it is supposed to be using.

The way it is now, it looks pretty random:

$ otool -L /Applications/MacPorts/FileZilla.app/Contents/Frameworks/libfilezilla.41.dylib
/Applications/MacPorts/FileZilla.app/Contents/Frameworks/libfilezilla.41.dylib:
	libfilezilla.41.dylib (compatibility version 42.0.0, current version 42.0.0)

comment:6 in reply to:  5 Changed 5 days ago by barracuda156

Replying to kencu:

the first, and most important, thing to do is to make sure FileZilla knows which libfilezilla it is supposed to be using.

The way it is now, it looks pretty random:

$ otool -L /Applications/MacPorts/FileZilla.app/Contents/Frameworks/libfilezilla.41.dylib
/Applications/MacPorts/FileZilla.app/Contents/Frameworks/libfilezilla.41.dylib:
	libfilezilla.41.dylib (compatibility version 42.0.0, current version 42.0.0)

I guess I have fixed it: https://github.com/macports/macports-ports/pull/23694

Note: See TracTickets for help on using tickets.