kydlo / ios-toolchain-based-on-clang-for-linux

Automatically exported from code.google.com/p/ios-toolchain-based-on-clang-for-linux
0 stars 0 forks source link

Linking fails for some code #22

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. checkout the repository https://github.com/haqu/tweejump
2.../../iphonesdk-utils-2.0/xcbuild/ios-xcbuild -c tweejump.xcodeproj/
3. make

What is the expected output? 
A binary file is linked.

What do you see instead?
make
mkdir -p xcbuild
ios-clang -include tweejump/Prefix.pch -I./tweejump -I./tweejump/Classes 
-I./tweejump/libs/FontLabel -I./tweejump/libs/cocos2d 
-I./tweejump/libs/cocos2d/Platforms -I./tweejump/libs/cocos2d/Platforms/Mac 
-I./tweejump/libs/cocos2d/Platforms/iOS -I./tweejump/libs/cocos2d/Support -I. 
-framework QuartzCore -framework OpenGLES -framework OpenAL -framework 
AudioToolbox -framework AVFoundation -framework UIKit -framework Foundation 
-framework CoreGraphics tweejump/libs/cocos2d/CCAction.o 
tweejump/libs/cocos2d/CCActionCamera.o tweejump/libs/cocos2d/CCActionEase.o 
tweejump/libs/cocos2d/CCActionGrid.o tweejump/libs/cocos2d/CCActionGrid3D.o 
tweejump/libs/cocos2d/CCActionInstant.o 
tweejump/libs/cocos2d/CCActionInterval.o 
tweejump/libs/cocos2d/CCActionManager.o 
tweejump/libs/cocos2d/CCActionPageTurn3D.o 
tweejump/libs/cocos2d/CCActionProgressTimer.o 
tweejump/libs/cocos2d/CCActionTiledGrid.o tweejump/libs/cocos2d/CCActionTween.o 
tweejump/libs/cocos2d/CCAnimation.o tweejump/libs/cocos2d/CCAnimationCache.o 
tweejump/libs/cocos2d/CCAtlasNode.o tweejump/libs/cocos2d/CCBlockSupport.o 
tweejump/libs/cocos2d/CCCamera.o tweejump/libs/cocos2d/CCConfiguration.o 
tweejump/libs/cocos2d/CCDirector.o tweejump/libs/cocos2d/CCDrawingPrimitives.o 
tweejump/libs/cocos2d/CCGrabber.o tweejump/libs/cocos2d/CCGrid.o 
tweejump/libs/cocos2d/CCLabelAtlas.o tweejump/libs/cocos2d/CCLabelBMFont.o 
tweejump/libs/cocos2d/CCLabelTTF.o tweejump/libs/cocos2d/CCLayer.o 
tweejump/libs/cocos2d/CCMenu.o tweejump/libs/cocos2d/CCMenuItem.o 
tweejump/libs/cocos2d/CCMotionStreak.o tweejump/libs/cocos2d/CCNode.o 
tweejump/libs/cocos2d/CCParallaxNode.o 
tweejump/libs/cocos2d/CCParticleExamples.o 
tweejump/libs/cocos2d/CCParticleSystem.o 
tweejump/libs/cocos2d/CCParticleSystemPoint.o 
tweejump/libs/cocos2d/CCParticleSystemQuad.o 
tweejump/libs/cocos2d/CCProgressTimer.o tweejump/libs/cocos2d/CCRenderTexture.o 
tweejump/libs/cocos2d/CCRibbon.o tweejump/libs/cocos2d/CCScene.o 
tweejump/libs/cocos2d/CCScheduler.o tweejump/libs/cocos2d/CCSprite.o 
tweejump/libs/cocos2d/CCSpriteBatchNode.o tweejump/libs/cocos2d/CCSpriteFrame.o 
tweejump/libs/cocos2d/CCSpriteFrameCache.o tweejump/libs/cocos2d/CCTexture2D.o 
tweejump/libs/cocos2d/CCTextureAtlas.o tweejump/libs/cocos2d/CCTextureCache.o 
tweejump/libs/cocos2d/CCTexturePVR.o tweejump/libs/cocos2d/CCTileMapAtlas.o 
tweejump/libs/cocos2d/CCTMXLayer.o tweejump/libs/cocos2d/CCTMXObjectGroup.o 
tweejump/libs/cocos2d/CCTMXTiledMap.o tweejump/libs/cocos2d/CCTMXXMLParser.o 
tweejump/libs/cocos2d/CCTransition.o 
tweejump/libs/cocos2d/CCTransitionPageTurn.o 
tweejump/libs/cocos2d/CCTransitionRadial.o tweejump/libs/cocos2d/cocos2d.o 
tweejump/libs/cocos2d/Platforms/iOS/CCDirectorIOS.o 
tweejump/libs/cocos2d/Platforms/iOS/CCTouchDispatcher.o 
tweejump/libs/cocos2d/Platforms/iOS/CCTouchHandler.o 
tweejump/libs/cocos2d/Platforms/iOS/EAGLView.o 
tweejump/libs/cocos2d/Platforms/iOS/ES1Renderer.o 
tweejump/libs/cocos2d/Platforms/iOS/glu.o 
tweejump/libs/cocos2d/Platforms/Mac/CCDirectorMac.o 
tweejump/libs/cocos2d/Platforms/Mac/CCEventDispatcher.o 
tweejump/libs/cocos2d/Platforms/Mac/MacGLView.o 
tweejump/libs/cocos2d/Platforms/Mac/MacWindow.o 
tweejump/libs/cocos2d/Support/base64.o tweejump/libs/cocos2d/Support/CCArray.o 
tweejump/libs/cocos2d/Support/CCFileUtils.o 
tweejump/libs/cocos2d/Support/CCProfiling.o 
tweejump/libs/cocos2d/Support/ccUtils.o 
tweejump/libs/cocos2d/Support/CGPointExtension.o 
tweejump/libs/cocos2d/Support/TGAlib.o 
tweejump/libs/cocos2d/Support/TransformUtils.o 
tweejump/libs/cocos2d/Support/ZipUtils.o tweejump/libs/FontLabel/FontLabel.o 
tweejump/libs/FontLabel/FontLabelStringDrawing.o 
tweejump/libs/FontLabel/FontManager.o 
tweejump/libs/FontLabel/ZAttributedString.o tweejump/libs/FontLabel/ZFont.o 
tweejump/main.o tweejump/AppDelegate.o tweejump/RootViewController.o 
tweejump/Classes/Game.o tweejump/Classes/Highscores.o tweejump/Classes/Main.o 
-o xcbuild/tweejump
Undefined symbols for architecture armv7:
  "_gzclose", referenced from:
      _ccInflateGZipFile in ZipUtils.o
  "_gzopen", referenced from:
      _ccInflateGZipFile in ZipUtils.o
  "_gzread", referenced from:
      _ccInflateGZipFile in ZipUtils.o
  "_inflate", referenced from:
      _inflateMemoryWithHint in ZipUtils.o
  "_inflateEnd", referenced from:
      _inflateMemoryWithHint in ZipUtils.o
  "_inflateInit2_", referenced from:
      _inflateMemoryWithHint in ZipUtils.o
  "_uncompress", referenced from:
      _ccInflateCCZFile in ZipUtils.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [tweejump] Error 1
What version of the product are you using? On what operating system?
Using the latest ios-toolchain from the repository. Ubuntu 13.04.

Please provide any additional information below.
I have symlinked the libLTO shared object
./usr/lib/llvm-3.2/lib/libLTO.so to /lib/libLTO so it would be found during 
linking.

Original issue reported on code.google.com by ukulos...@gmail.com on 7 Oct 2013 at 7:14

GoogleCodeExporter commented 8 years ago
Ok, seems like adding the -lz flag removes this problem.

Original comment by ukulos...@gmail.com on 7 Oct 2013 at 7:26

GoogleCodeExporter commented 8 years ago
I have the same problem,where can I add the -lz flag?
Thank you!

Original comment by negy.li...@gmail.com on 20 Oct 2013 at 6:37

GoogleCodeExporter commented 8 years ago
Hello! 

you add it to your Makefile's LDFLAGS

LDFLAGS += -lz

Original comment by ukulos...@gmail.com on 20 Oct 2013 at 8:24

GoogleCodeExporter commented 8 years ago
Thank you for your reply!

Original comment by negy.li...@gmail.com on 22 Oct 2013 at 12:39