November 15, 2019, 09:01:06 AM

Author Topic: duplicate symbol issue on MacOS  (Read 247 times)

Offline peterigz

  • Jr. Member
  • **
  • Posts: 5
duplicate symbol issue on MacOS
« on: October 12, 2019, 04:52:06 PM »
Hello, Catalina is out for MacOS so trying to build a 64bit version of TimelineFX but having the following compiler errors. Same code compiles fine on Windows 64bit it's only happening on Mac so I guess an XCode thing:

Code: [Select]
duplicate symbol '_png_check_keyword' in:
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/pub.mod/libpng.mod/libpng.debug.macos.x64.a(pngset.c.debug.macos.x64.o)
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/bah.mod/freeimage.mod/freeimage.debug.macos.x64.a(pngset.c.debug.macos.x64.o)
duplicate symbol '_png_image_write_to_memory' in:
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/pub.mod/libpng.mod/libpng.debug.macos.x64.a(pngwrite.c.debug.macos.x64.o)
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/bah.mod/freeimage.mod/freeimage.debug.macos.x64.a(pngwrite.c.debug.macos.x64.o)
duplicate symbol '_png_check_chunk_length' in:
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/bah.mod/freeimage.mod/freeimage.debug.macos.x64.a(pngrutil.c.debug.macos.x64.o)
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/pub.mod/libpng.mod/libpng.debug.macos.x64.a(pngrutil.c.debug.macos.x64.o)
duplicate symbol '_png_zlib_inflate' in:
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/bah.mod/freeimage.mod/freeimage.debug.macos.x64.a(pngrutil.c.debug.macos.x64.o)
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/pub.mod/libpng.mod/libpng.debug.macos.x64.a(pngrutil.c.debug.macos.x64.o)
duplicate symbol '_z_errmsg' in:
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/bah.mod/freeimage.mod/freeimage.debug.macos.x64.a(zutil.c.debug.macos.x64.o)
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/pub.mod/zlib.mod/zlib.debug.macos.x64.a(zutil.c.debug.macos.x64.o)
duplicate symbol '_jpeg_natural_order7' in:
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/bah.mod/freeimage.mod/freeimage.debug.macos.x64.a(jutils.c.debug.macos.x64.o)
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/wx.mod/lib/macosx64/libwxjpeg-3.1.a(wxjpeg_jutils.o)
duplicate symbol '_jpeg_natural_order6' in:
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/bah.mod/freeimage.mod/freeimage.debug.macos.x64.a(jutils.c.debug.macos.x64.o)
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/wx.mod/lib/macosx64/libwxjpeg-3.1.a(wxjpeg_jutils.o)
duplicate symbol '_jpeg_natural_order5' in:
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/bah.mod/freeimage.mod/freeimage.debug.macos.x64.a(jutils.c.debug.macos.x64.o)
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/wx.mod/lib/macosx64/libwxjpeg-3.1.a(wxjpeg_jutils.o)
duplicate symbol '_jpeg_natural_order4' in:
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/bah.mod/freeimage.mod/freeimage.debug.macos.x64.a(jutils.c.debug.macos.x64.o)
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/wx.mod/lib/macosx64/libwxjpeg-3.1.a(wxjpeg_jutils.o)
duplicate symbol '_jpeg_natural_order3' in:
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/bah.mod/freeimage.mod/freeimage.debug.macos.x64.a(jutils.c.debug.macos.x64.o)
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/wx.mod/lib/macosx64/libwxjpeg-3.1.a(wxjpeg_jutils.o)
duplicate symbol '_jpeg_natural_order2' in:
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/bah.mod/freeimage.mod/freeimage.debug.macos.x64.a(jutils.c.debug.macos.x64.o)
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/wx.mod/lib/macosx64/libwxjpeg-3.1.a(wxjpeg_jutils.o)
ld: 11 duplicate symbols for architecture x86_64

Looks like pub.libpng is clashing with the freeimage lib and also clashes with wx as well. Not sure what a work around might be for this, anyone got any ideas? Thanks :)

Offline peterigz

  • Jr. Member
  • **
  • Posts: 5
Re: duplicate symbol issue on MacOS
« Reply #1 on: October 22, 2019, 04:25:36 PM »
I've basically hacked this for now and renamed the functions in the freeimage library so that they don't clash which works fine albeit a bit workaroundy :)

Offline Derron

  • Hero Member
  • *****
  • Posts: 2569
Re: duplicate symbol issue on MacOS
« Reply #2 on: October 22, 2019, 07:17:20 PM »
Raised an issue for you - let's see when it gets fixed (if it requires a fix).


bye
Ron

Offline peterigz

  • Jr. Member
  • **
  • Posts: 5
Re: duplicate symbol issue on MacOS
« Reply #3 on: October 24, 2019, 11:49:20 AM »
Thanks Derron.