Results 1 to 2 of 2
Discuss Undefined symbols when compiling with toolchain at the Free Toolchain Software (Cydia App's) - Hackint0sh.org; Hi, I built arm-apple-darwin-gcc with this tutorial. I was able to compile and install a ...
  1. #1
    Newbie Array

    Join Date
    Jan 2009
    Posts
    3
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Unhappy Undefined symbols when compiling with toolchain

    Hi,
    I built arm-apple-darwin-gcc with this tutorial.

    I was able to compile and install a simple "Hello world" application,
    but when I try to compile something more complex (c++, some external libraries), I get "Undefined symbols" error for the following symbols:

    ___muldf3vfp,
    ___fixdfsivfp,
    ___fixsfsivfp,
    __Unwind_SjLj_Resume,
    __Unwind_SjLj_Unregister,
    __Unwind_SjLj_Register,
    ___floatsisfvfp

    Does anyone knows what these symbols are or where can I find their definitions?


    Thanks,
    Asaf Pinhassi.



  2. #2
    Newbie Array

    Join Date
    Jan 2009
    Posts
    3
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Thumbs up

    Problem solved.
    The problem was linking libgcc_eh.a
    To solve this, use:
    LIBFLAGS += -L"/usr/local/arm-apple-darwin/lib"
    instead of:
    LIBFLAGS += -L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib

    I created the toolchain env using this tutorial:
    http://ansani.it/2008/08/12/build-th...n-macosx-105x/

    I used this makefile:
    Code:
    SDKVER=2.2
    SDK=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(SDKVER).sdk
    #SDK=/usr/local/share/iphone-filesystem
    
    
    LIBFLAGS += -L/usr/local/share/iphone-filesystem/usr/lib
    LIBFLAGS += -L/usr/lib 
    LIBFLAGS += -L"/usr/local/arm-apple-darwin/lib"
    INCLUDES += -I. 
    
    
    # the IP address of your iPhone or iPod Touch
    DEVICE	= iPhone
    
    APPL	= MyApp
    
    #DOTH	= MyApp.h
    #OBJS	= $(SRCPATH)/src/AnimContainer.cpp $(SRCPATH)/src/AnimContainer.cpp
    
    TGZFILE	= $(HOME)/backup/MyApp.tgz
    
    
    # ----------------------------------------------------------------------
    
    PROJECTNAME=MyApp
    APPFOLDER=$(PROJECTNAME).app
    INSTALLFOLDER=$(PROJECTNAME).app
    
    IPHONE_IP=iPhone
    
    
    
    CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1
    CPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-g++-4.0.1
    
    LD=$(CPP)
    LDFLAGS += -arch arm -lobjc
    LDFLAGS += -lz
    LDFLAGS += -lstdc++.6
    #LDFLAGS += -licucore
    LDFLAGS += -llockdown
    LDFLAGS += -lgcc_s.1
    LDFLAGS += -framework CoreFoundation
    LDFLAGS += -framework Foundation			
    LDFLAGS += -framework UIKit					
    LDFLAGS += -framework CoreGraphics			
    LDFLAGS += -framework QuartzCore			
    LDFLAGS += -framework GraphicsServices
    #LDFLAGS += -framework CoreSurface
    #LDFLAGS += -framework CoreAudio
    #LDFLAGS += -framework Celestial
    LDFLAGS += -framework AudioToolbox			
    #LDFLAGS += -framework WebCore
    #LDFLAGS += -framework WebKit
    #LDFLAGS += -framework SystemConfiguration
    
    LDFLAGS += -L"/usr/local/share/iphone-filesystem/usr/lib"
    
    LDFLAGS += -framework OpenGLES				
    
    
    LDFLAGS += -isysroot $(SDK)
    LDFLAGS += -F"$(SDK)/System/Library/Frameworks"
    LDFLAGS += -F"$(SDK)/System/Library/PrivateFrameworks"
    LDFLAGS += -bind_at_load
    LDFLAGS += -multiply_defined suppress
    LDFLAGS += -march=arm
    LDFLAGS += -mmacosx-version-min=10.4
    #LDFLAGS += -mmacosx-version-min=10.5
    
    LDFLAGS += -mcpu=arm1176jzf-s
    
    CFLAGS += -isysroot $(SDK)
    CFLAGS += -DDEBUG -Wall 
    CFLAGS += -Diphoneos_version_min=2.0
    
    BUILDDIR=./build/2.0
    SRCDIR=./src
    RESDIR=./Resources
    OBJS+=$(patsubst %.m,%.o,$(wildcard $(SRCDIR)/*.m))
    OBJS+=$(patsubst %.c,%.o,$(wildcard $(SRCDIR)/*.c))
    OBJS+=$(patsubst %.m,%.o,$(wildcard ./*.m))
    RESOURCES=$(wildcard $(RESDIR)/*)
    RESOURCES+=$(wildcard ./*.png)
    
    all: $(PROJECTNAME)
    
    $(PROJECTNAME): $(OBJS)
    	$(LD) $(LDFLAGS) -o $@ $^ $(LIBFLAGS) 
    
    %.o: %.m
    	$(CC) -c $(CFLAGS) $< -o $@
    
    %.o: %.c
    	$(CC) -c $(CFLAGS) $< -o $@
    
    
    %.o: %.cpp
    	$(CPP) $(INCLUDES) -c $(CFLAGS) $< -o $@
    
    
    dist: $(PROJECTNAME)
    	rm -rf $(BUILDDIR)
    	mkdir -p $(BUILDDIR)/$(APPFOLDER)
    	cp -r $(RESOURCES) $(BUILDDIR)/$(APPFOLDER)
    	cp Info.plist $(BUILDDIR)/$(APPFOLDER)/Info.plist
    	@echo "APPL????" > $(BUILDDIR)/$(APPFOLDER)/PkgInfo
    	export CODESIGN_ALLOCATE=/usr/toolchain2/pre/bin/arm-apple-darwin9-codesign_allocate; ldid -S $(PROJECTNAME)
    	cp $(PROJECTNAME) $(BUILDDIR)/$(APPFOLDER)
    
    install: dist
    	ping -t 3 -c 1 $(IPHONE_IP)
    	ssh root@$(IPHONE_IP) 'rm -fr /Applications/$(INSTALLFOLDER)'
    	scp -r $(BUILDDIR)/$(APPFOLDER) root@$(IPHONE_IP):/Applications/$(INSTALLFOLDER)
    	ssh root@$(IPHONE_IP) 'respring'
    	@echo "Application $(INSTALLFOLDER) installed"
    
    uninstall:
    	ping -t 3 -c 1 $(IPHONE_IP)
    	ssh root@$(IPHONE_IP) 'rm -fr /Applications/$(INSTALLFOLDER); respring'
    	@echo "Application $(INSTALLFOLDER) uninstalled"
    
    clean:
    	@rm -f $(SRCPATH)/src/*.o
    	@rm -rf $(BUILDDIR)
    	@rm -f $(PROJECTNAME)


    Goodluck for anyone who experiences it in the future,
    Asaf Pinhassi

 

 

Similar Threads

  1. [Toolchain Question] Unable to compile UI App in toolchain
    By sireko in forum Free Toolchain Software (Cydia App's)
    Replies: 1
    Last Post: 06-26-2009, 10:31 PM
  2. [Toolchain 2.0] - problem compiling XAR
    By ironmang in forum iPhone Developer Exchange
    Replies: 5
    Last Post: 06-06-2009, 05:32 AM
  3. (Toolchain) New VMWare Community Toolchain (2.0)
    By Shade.sh in forum Free Toolchain Software (Cydia App's)
    Replies: 2
    Last Post: 10-20-2008, 10:14 PM
  4. Replies: 0
    Last Post: 09-18-2007, 08:51 PM
  5. compiling the toolchain
    By bram in forum Free Toolchain Software (Cydia App's)
    Replies: 9
    Last Post: 08-27-2007, 04:02 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 11:40 AM.
twitter, follow us!