Bug 299029 - Link failure on OS X and plugins build as ELF rather than Mach-O exectuables
Summary: Link failure on OS X and plugins build as ELF rather than Mach-O exectuables
Status: RESOLVED NOT A BUG
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: 1.5 (KDE 4.10)
Platform: Compiled Sources macOS
: NOR normal
Target Milestone: ---
Assignee: marble-bugs
URL: http://home2.btconnect.com/pom.linux....
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-29 12:03 UTC by amit
Modified: 2019-10-05 06:17 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description amit 2012-04-29 12:03:43 UTC
Following standard instructions from techbase on compiling marble from source:

1) Marble compiles as i386 but Qt Mac binaries are distributed as x86_64.  This provokes link error.

2) Plugins (if specified) build as Unix .so libraries (ELF) rather than OS X Mach-O dylibs.

Reproducible: Always

Steps to Reproduce:
1. Download source from git to OS X machine
2. Configure Cmake flags per Techbase (inc. designer plugin on) from build dir
3. make
Actual Results:  
Linker error.
Any plugins built (following resolution of linker errors) are created as .so

Expected Results:  
Should link or report additional CMake options to resolve.
Should build as -dylib not .so

Additional detail at url above & posted to marble-devel
Comment 1 Hanspeter Niederstrasser 2015-01-16 04:16:20 UTC
This is an old entry, but wanted to clarify that plugins should in fact be compiled as -bundle and not -dynamiclib on OS X: <https://developer.apple.com/library/mac/documentation/Porting/Conceptual/PortingUnix/compiling/compiling.html#//apple_ref/doc/uid/TP40002850-TPXREF103> and the preferred extension for plugins is either .so or .bundle on OS X (dylib should be reserved for shared libraries).

A compiled plugin on OS X that ends in .so is not ELF:

$ otool -hv lib/kde4/libmarble_part.so
lib/kde4/libmarble_part.so:
Mach header
      magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
MH_MAGIC_64  X86_64        ALL  0x00      BUNDLE    24       2504   NOUNDEFS DYLDLINK TWOLEVEL BINDS_TO_WEAK

This bug should be marked invalid.
Comment 2 amit 2019-10-05 06:14:40 UTC
Hanspeter - thank you for the response. I haven't looked in here for a couple of years but still found the response useful/informative.