Coder Social home page Coder Social logo

Comments (22)

pyrosphere avatar pyrosphere commented on June 19, 2024

I replaced jpeg/prebuilt/ios/libjpeg.a to a binary from libjpeg-turbo and this warning disappeared. This binary however doesn't include a slice for arm64.

After fixing the warning for libjpeg, the same warning appeared for libtiff:

ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in __TIFFMultiply32 from /Users/user/Library/Developer/Xcode/DerivedData/Project/Build/Products/Debug-iphoneos/libcocos2dx iOS.a(tif_aux.o). To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie

Replacing tiff/prebuilt/ios/libtiff.a also fixed the warning. There were no more warnings concerning PIE and now running "otool -hv" on the .app shows the PIE flag (it didn't before).

I don't know how libjpeg and libtiff are being compiled but it might be worth looking into it. Thanks.

from cocos2d-x-3rd-party-libs-bin.

Zambiorix avatar Zambiorix commented on June 19, 2024

where did you get the libtiff.a library to replace the one in "tiff/prebuilt/ios/" ?

thanks!

from cocos2d-x-3rd-party-libs-bin.

pyrosphere avatar pyrosphere commented on June 19, 2024

I don't remember, sorry - I vaguely remember trying to compile it but not sure if I was successful or if I ended up grabbing a binary online.

from cocos2d-x-3rd-party-libs-bin.

Zambiorix avatar Zambiorix commented on June 19, 2024

For those interested, grab the libs package from Imagemagick:
http://www.imagemagick.org/download/iOS/

And replace for cocos2d-x/external/jpeg and cocos2d-x/external/tiff both the include files and the prebuilt libs for ios with the ones from Imagemagick. Clean and rebuild and all should be fine. "otool -hv" shows PIE flag.

Don't forget, if you run "download-deps.py", those files are overwritten again ...

from cocos2d-x-3rd-party-libs-bin.

pyrosphere avatar pyrosphere commented on June 19, 2024

Those are great, thanks! They include armv64 and starting on February 1st 2015, new apps will require 64-bit support: https://developer.apple.com/news/?id=10202014a

lipo -info libtiff.a 
Architectures in the fat file: libtiff.a are: armv7 armv7s i386 x86_64 arm64 

lipo -info libpng.a 
Architectures in the fat file: libpng.a are: armv7 armv7s i386 x86_64 arm64

Edit: Actually I just tried them out in my project (which is using cocos2d-x 3.2) and I get the following error:

cocos2d: jpeg error: JPEG parameter struct mismatch: library thinks size is 488, caller expects 452

from cocos2d-x-3rd-party-libs-bin.

Zambiorix avatar Zambiorix commented on June 19, 2024

did you copy all the headers ? (i think there is one additional header for jpeg)

from cocos2d-x-3rd-party-libs-bin.

pyrosphere avatar pyrosphere commented on June 19, 2024

I didn't, might have been that. Thanks.

from cocos2d-x-3rd-party-libs-bin.

Zambiorix avatar Zambiorix commented on June 19, 2024

no worries

all works in my projects

from cocos2d-x-3rd-party-libs-bin.

Zambiorix avatar Zambiorix commented on June 19, 2024

I thought non-PIE apps are not allowed on the appstore? I wonder why nobody of the regular cocos2d-x maintainers have noticed this problem.

I just moved to the latest 3.3rc0 and the problem still persists

from cocos2d-x-3rd-party-libs-bin.

pyrosphere avatar pyrosphere commented on June 19, 2024

Apple prefers PIE apps, but you can still submit a non-PIE app and it will probably be accepted - they might give you a warning about that though.

from cocos2d-x-3rd-party-libs-bin.

Zambiorix avatar Zambiorix commented on June 19, 2024

Noticed the warning a long time ago, didn't submit a non-pie app for a while. Thought they would have forced it by now...

from cocos2d-x-3rd-party-libs-bin.

Pstoppani avatar Pstoppani commented on June 19, 2024

I'm on cocos2d-x 3.3 and still get this warning. I tried the suggest libraries above and this did not fix it.

from cocos2d-x-3rd-party-libs-bin.

zilongshanren avatar zilongshanren commented on June 19, 2024

@Pstoppani
Hi, how could I reproduce this warning? Should I upload the app to AppStore or just compile it ?

from cocos2d-x-3rd-party-libs-bin.

Pstoppani avatar Pstoppani commented on June 19, 2024

I created a simple project in 3.3 and ran it on my iPhone.

Pete

On Feb 4, 2015, at 5:49 PM, 子龙山人 [email protected] wrote:

@Pstoppani
Hi, how could I reproduce this warning? Should I upload the app to AppStore or just compile it ?


Reply to this email directly or view it on GitHub.

from cocos2d-x-3rd-party-libs-bin.

Leandros avatar Leandros commented on June 19, 2024

Still persists in cocos2d-x 3.4.

PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in _jinit_arith_decoder from /Applications/Cocos/frameworks/cocos2d-x-3.4rc1/prebuilt/ios/libcocos2d iOS.a(jdarith.o). To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie

from cocos2d-x-3rd-party-libs-bin.

zilongshanren avatar zilongshanren commented on June 19, 2024

@minggo
I found in our cpp-test project, the *Generate Position-Dependent Code" is disabled. Should we turn it on?

from cocos2d-x-3rd-party-libs-bin.

minggo avatar minggo commented on June 19, 2024

Yes please if it doesn't have any side-effect.

from cocos2d-x-3rd-party-libs-bin.

stevetranby avatar stevetranby commented on June 19, 2024

Shouldn't cpp-test be setup for best practice? Not working around this issue by setting it to YES, but rather keeping it as NO and fixing the issue with the core and 3rd party libraries?

from cocos2d-x-3rd-party-libs-bin.

minggo avatar minggo commented on June 19, 2024

@stevetranby
Yep, we should fix it in correct way.
Did you mean it is caused by the libraries?
If so, i think we should re-build them.

from cocos2d-x-3rd-party-libs-bin.

zilongshanren avatar zilongshanren commented on June 19, 2024

@stevetranby I will consider to compile all the 3rd party libraries with PIE flag. But now it doesn't has such a high priority.

from cocos2d-x-3rd-party-libs-bin.

jonnyijapan avatar jonnyijapan commented on June 19, 2024

Still seeing this in Cocos2dX 3.5. What do I do??

from cocos2d-x-3rd-party-libs-bin.

zilongshanren avatar zilongshanren commented on June 19, 2024

@jonnyijapan Fixed at #137

from cocos2d-x-3rd-party-libs-bin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.