Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#5493 closed defect (fixed)

[ATLASUI] Build atlasUI inside xcode missing libpng, libjpeg

Reported by: trompetin17 Owned by:
Priority: Should Have Milestone: Alpha 24
Component: Atlas editor Keywords:
Cc: Patch: Phab:D2062

Description

I downloaded the svn project, use cleanworkspace.sh and then updateworkspace.sh, open Xcode, change the schema to add "AtlasUI" in the target(see the image attached) and add the flag "-editor", finally press build and I'm getting an error about missing libpng

    Ld /Users/juanguillermo/Documents/0ad/binaries/system/libAtlasUI_dbg.dylib normal x86_64 (in target: AtlasUI)
    cd /Users/juanguillermo/Documents/0ad/build/workspaces/xcode4
    export MACOSX_DEPLOYMENT_TARGET=10.14
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -L/Users/juanguillermo/Documents/0ad/binaries/system -L../../../binaries/system -L../../../libraries/osx/boost/lib -L../../../libraries/osx/libxml2/lib -L../../../libraries/osx/iconv/lib -L../../../libraries/osx/sdl2/lib -L../../../libraries/osx/wxwidgets/lib -L../../../libraries/osx/zlib/lib -F/Users/juanguillermo/Documents/0ad/binaries/system -filelist /Users/juanguillermo/Library/Developer/Xcode/DerivedData/pyrogenesis-ddhpzmkanryuyhcpwqsgepjlntou/Build/Intermediates.noindex/AtlasUI.build/Objects-normal/x86_64/AtlasUI_dbg.LinkFileList -install_name /usr/local/lib/libAtlasUI_dbg.dylib -mmacosx-version-min=10.14 -Xlinker -object_path_lto -Xlinker /Users/juanguillermo/Library/Developer/Xcode/DerivedData/pyrogenesis-ddhpzmkanryuyhcpwqsgepjlntou/Build/Intermediates.noindex/AtlasUI.build/Objects-normal/x86_64/AtlasUI_dbg_lto.o -Xlinker -no_deduplicate -lboost_filesystem-mt -lboost_system-mt -lxml2 -lSDL2 -lm -lobjc -lpng -ljpeg -lwxregexu-3.0 -lwxexpat-3.0 -lpthread -liconv -lz -mmacosx-version-min=10.9 -stdlib=libc++ -Wl,-framework,CoreAudio -Wl,-framework,ForceFeedback -Wl,-framework,CoreVideo -Wl,-framework,IOKit -Wl,-framework,Carbon -Wl,-framework,Cocoa -Wl,-framework,AudioToolbox -Wl,-framework,System /Users/juanguillermo/Documents/0ad/libraries/osx/wxwidgets/lib/libwx_osx_cocoau_gl-3.0.a /Users/juanguillermo/Documents/0ad/libraries/osx/wxwidgets/lib/libwx_osx_cocoau_xrc-3.0.a /Users/juanguillermo/Documents/0ad/libraries/osx/wxwidgets/lib/libwx_osx_cocoau_qa-3.0.a /Users/juanguillermo/Documents/0ad/libraries/osx/wxwidgets/lib/libwx_baseu_net-3.0.a /Users/juanguillermo/Documents/0ad/libraries/osx/wxwidgets/lib/libwx_osx_cocoau_html-3.0.a /Users/juanguillermo/Documents/0ad/libraries/osx/wxwidgets/lib/libwx_osx_cocoau_adv-3.0.a /Users/juanguillermo/Documents/0ad/libraries/osx/wxwidgets/lib/libwx_osx_cocoau_core-3.0.a /Users/juanguillermo/Documents/0ad/libraries/osx/wxwidgets/lib/libwx_baseu_xml-3.0.a /Users/juanguillermo/Documents/0ad/libraries/osx/wxwidgets/lib/libwx_baseu-3.0.a -Wl,-framework,OpenGL -Wl,-framework,AGL -install_name @executable_path/libAtlasUI_dbg.dylib /Users/juanguillermo/Documents/0ad/binaries/system/libAtlasObject_dbg.a -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/juanguillermo/Library/Developer/Xcode/DerivedData/pyrogenesis-ddhpzmkanryuyhcpwqsgepjlntou/Build/Intermediates.noindex/AtlasUI.build/Objects-normal/x86_64/AtlasUI_dbg_dependency_info.dat -o /Users/juanguillermo/Documents/0ad/binaries/system/libAtlasUI_dbg.dylib

ld: library not found for -lpng
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have to manually add libpng in AtlasUI->BuildSettings in Header search paths : ../../../libraries/osx/libpng/include Library search paths: ../../../libraries/osx/libpng/lib

and when I rebuild once again now Im getting the error

Ld /Users/juanguillermo/Documents/0ad/binaries/system/libAtlasUI_dbg.dylib normal x86_64 (in target: AtlasUI)
    cd /Users/juanguillermo/Documents/0ad/build/workspaces/xcode4
    export MACOSX_DEPLOYMENT_TARGET=10.14
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -L/Users/juanguillermo/Documents/0ad/binaries/system -L../../../binaries/system -L../../../libraries/osx/boost/lib -L../../../libraries/osx/libxml2/lib -L../../../libraries/osx/iconv/lib -L../../../libraries/osx/sdl2/lib -L../../../libraries/osx/wxwidgets/lib -L../../../libraries/osx/zlib/lib -L../../../libraries/osx/libpng/lib -F/Users/juanguillermo/Documents/0ad/binaries/system -filelist /Users/juanguillermo/Library/Developer/Xcode/DerivedData/pyrogenesis-ddhpzmkanryuyhcpwqsgepjlntou/Build/Intermediates.noindex/AtlasUI.build/Objects-normal/x86_64/AtlasUI_dbg.LinkFileList -install_name /usr/local/lib/libAtlasUI_dbg.dylib -mmacosx-version-min=10.14 -Xlinker -object_path_lto -Xlinker /Users/juanguillermo/Library/Developer/Xcode/DerivedData/pyrogenesis-ddhpzmkanryuyhcpwqsgepjlntou/Build/Intermediates.noindex/AtlasUI.build/Objects-normal/x86_64/AtlasUI_dbg_lto.o -Xlinker -no_deduplicate -lboost_filesystem-mt -lboost_system-mt -lxml2 -lSDL2 -lm -lobjc -lpng -ljpeg -lwxregexu-3.0 -lwxexpat-3.0 -lpthread -liconv -lz -mmacosx-version-min=10.9 -stdlib=libc++ -Wl,-framework,CoreAudio -Wl,-framework,ForceFeedback -Wl,-framework,CoreVideo -Wl,-framework,IOKit -Wl,-framework,Carbon -Wl,-framework,Cocoa -Wl,-framework,AudioToolbox -Wl,-framework,System /Users/juanguillermo/Documents/0ad/libraries/osx/wxwidgets/lib/libwx_osx_cocoau_gl-3.0.a /Users/juanguillermo/Documents/0ad/libraries/osx/wxwidgets/lib/libwx_osx_cocoau_xrc-3.0.a /Users/juanguillermo/Documents/0ad/libraries/osx/wxwidgets/lib/libwx_osx_cocoau_qa-3.0.a /Users/juanguillermo/Documents/0ad/libraries/osx/wxwidgets/lib/libwx_baseu_net-3.0.a /Users/juanguillermo/Documents/0ad/libraries/osx/wxwidgets/lib/libwx_osx_cocoau_html-3.0.a /Users/juanguillermo/Documents/0ad/libraries/osx/wxwidgets/lib/libwx_osx_cocoau_adv-3.0.a /Users/juanguillermo/Documents/0ad/libraries/osx/wxwidgets/lib/libwx_osx_cocoau_core-3.0.a /Users/juanguillermo/Documents/0ad/libraries/osx/wxwidgets/lib/libwx_baseu_xml-3.0.a /Users/juanguillermo/Documents/0ad/libraries/osx/wxwidgets/lib/libwx_baseu-3.0.a -Wl,-framework,OpenGL -Wl,-framework,AGL -install_name @executable_path/libAtlasUI_dbg.dylib /Users/juanguillermo/Documents/0ad/binaries/system/libAtlasObject_dbg.a -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/juanguillermo/Library/Developer/Xcode/DerivedData/pyrogenesis-ddhpzmkanryuyhcpwqsgepjlntou/Build/Intermediates.noindex/AtlasUI.build/Objects-normal/x86_64/AtlasUI_dbg_dependency_info.dat -o /Users/juanguillermo/Documents/0ad/binaries/system/libAtlasUI_dbg.dylib

ld: library not found for -ljpeg
clang: error: linker command failed with exit code 1 (use -v to see invocation)

that in this case I only add in AtlasUI->BuildSettings in Header search paths : /usr/local/include Library search paths: /usr/local/lib

and now all build correctly.

But why this happened?

Looking inside premade5.lua I found that libpng is missing in atlas_extern_libs(line 1139), so I added and repeat the steps and now no error about missing libpng.

Anyone who knows what else could be the problem

Attachments (5)

Screen Shot 2019-07-11 at 8.48.50 AM.png (177.2 KB ) - added by trompetin17 5 years ago.
ljpeg
Screen Shot 2019-07-11 at 8.47.05 AM.png (140.6 KB ) - added by trompetin17 5 years ago.
buildsettings
Screen Shot 2019-07-11 at 8.29.54 AM.png (307.4 KB ) - added by trompetin17 5 years ago.
lpng
Screen Shot 2019-07-11 at 8.27.27 AM.png (533.7 KB ) - added by trompetin17 5 years ago.
flag editor
Screen Shot 2019-07-11 at 8.27.17 AM.png (482.1 KB ) - added by trompetin17 5 years ago.
targets

Download all attachments as: .zip

Change History (9)

by trompetin17, 5 years ago

ljpeg

by trompetin17, 5 years ago

buildsettings

by trompetin17, 5 years ago

lpng

by trompetin17, 5 years ago

flag editor

by trompetin17, 5 years ago

targets

comment:1 by trompetin17, 5 years ago

Patch: Phab:D2062

comment:2 by trompetin17, 5 years ago

In 22454:

fixing Build atlasUI inside xcode missing libpng, libjpeg

Refs #5493
Differential Revision: ​https://code.wildfiregames.com/D2062
Reviewed By: historic_bruno

comment:3 by trompetin17, 5 years ago

Resolution: fixed
Status: newclosed

comment:4 by trompetin17, 5 years ago

Milestone: BacklogAlpha 24
Note: See TracTickets for help on using tickets.