Comments (22)
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.
where did you get the libtiff.a library to replace the one in "tiff/prebuilt/ios/" ?
thanks!
from cocos2d-x-3rd-party-libs-bin.
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.
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.
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.
did you copy all the headers ? (i think there is one additional header for jpeg)
from cocos2d-x-3rd-party-libs-bin.
I didn't, might have been that. Thanks.
from cocos2d-x-3rd-party-libs-bin.
no worries
all works in my projects
from cocos2d-x-3rd-party-libs-bin.
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.
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.
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.
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.
@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.
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.
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.
@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.
Yes please if it doesn't have any side-effect.
from cocos2d-x-3rd-party-libs-bin.
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.
@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.
@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.
Still seeing this in Cocos2dX 3.5. What do I do??
from cocos2d-x-3rd-party-libs-bin.
@jonnyijapan Fixed at #137
from cocos2d-x-3rd-party-libs-bin.
Related Issues (20)
- No headers for crypto and ssl prebuilt libraries HOT 1
- Missing the file lua51-2015.lib and lua51-2015.dll HOT 1
- cocos android build fails with SSL enabled in libwebsocket HOT 1
- Can provide some of the code I winc win32 environment HOT 8
- Chipmunk: missing 32bit prebuilt binary for linux HOT 1
- LNK1181 error. Cannot open libcurl_imp.lib HOT 1
- Update Box2D v2.3.0 -> v2.3.2 HOT 1
- openssl: struct dh_st declaration missing for all platforms but win10 HOT 1
- update libwebp from 0.5.0 to 0.6.0
- Box2D b2Island::Solve() EXC_BAD_ACCESS
- glfw 3.2 crashes during glfwInit() on some Windows 10 machines, upgrade to 3.2.1 HOT 1
- Curl not getting added for ios project in cocos2dx v3.17 HOT 2
- Wrong version information HOT 1
- Incorrect win32 IMPORTED configuration HOT 3
- websocket is compiled in debug mode HOT 3
- libuv prebuilt for windows is a debug version HOT 2
- Bug in bullet header
- cmake没有为external项目link binary
- v4 luajit crashed on ios simulator HOT 2
- Buffer out of bounds access through pointer in rapidxml [ASAN] HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cocos2d-x-3rd-party-libs-bin.