ionic-team / ionic-v1

The repo for Ionic 1.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic
Other
192 stars 187 forks source link

Upgrading cli and am unable to build my existing ionic v1 project #325

Open Nakea opened 6 years ago

Nakea commented 6 years ago

I recently upgraded to the Ionic CLI. When I try to build my existing ionic v1 project, the build fails and by viewing the logs I don't see what could be causing the problem. I followed all the steps outlined in http://blog.ionic.io/announcing-ionic-cli-v3/ when upgrading.

Here is what I have when I run ionic info:

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.13.1
    ionic (Ionic CLI) : 3.13.2

global packages:

    cordova (Cordova CLI) : 7.1.0 

local packages:

    Cordova Platforms : android 6.1.2 ios 4.5.2
    Ionic Framework   : ionic1 1.3.2

System:

    ios-deploy : 1.9.1 
    ios-sim    : 6.1.2 
    Node       : v6.9.5
    npm        : 5.4.2 
    OS         : macOS Sierra
    Xcode      : Xcode 9.0.1 Build version 9A1004 

Misc:

    backend : pro

The following is what I get when trying to run the build:

? What platform would you like to build (android, ios): ios
[WARN] Not performing Ionic build for project type: ionic1.
> cordova build ios
✖ Running command - failed!
[ERROR] An error occurred while running cordova build ios (exit code 1):

        (truncated) ... build/Objects-normal/x86_64/IonicKeyboard.d --serialize-diagnostics 
        /Users/christophernakea/Library/Developer/Xcode/DerivedData/synctup-ciupgzhzpacjwohbhancqlvpjrgk/Build/Intermediates.noindex/synctup.build/Debug-iphonesimulator/synctup.build/Objects-normal/x86_64/IonicKeyboard.dia 
        -c 
        /Users/christophernakea/Documents/Projects/synctup/platforms/ios/synctup/Plugins/ionic-plugin-keyboard/IonicKeyboard.m 
        -o 
        /Users/christophernakea/Library/Developer/Xcode/DerivedData/synctup-ciupgzhzpacjwohbhancqlvpjrgk/Build/Intermediates.noindex/synctup.build/Debug-iphonesimulator/synctup.build/Objects-normal/x86_64/IonicKeyboard.o

        Ld build/emulator/synctup.app/synctup normal x86_64
             cd /Users/christophernakea/Documents/Projects/synctup/platforms/ios
             export IPHONEOS_DEPLOYMENT_TARGET=9.0
             export 
        PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/christophernakea/Documents/Projects/synctup/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/mysql/bin"
             /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 
        -isysroot 
        /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk 
        -L/Users/christophernakea/Documents/Projects/synctup/platforms/ios/build/emulator 
        -L/Users/christophernakea/Documents/Projects/synctup/platforms/ios/synctup/Plugins/cordova-plugin-extension 
        -F/Users/christophernakea/Documents/Projects/synctup/platforms/ios/build/emulator 
        -Fsynctup/Plugins/cordova-admobsdk -Fsynctup/Plugins/cordova-facebook-audnet-sdk -filelist 
        /Users/christophernakea/Library/Developer/Xcode/DerivedData/synctup-ciupgzhzpacjwohbhancqlvpjrgk/Build/Intermediates.noindex/synctup.build/Debug-iphonesimulator/synctup.build/Objects-normal/x86_64/synctup.LinkFileList 
        -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=9.0 -dead_strip -Xlinker 
        -object_path_lto -Xlinker 
        /Users/christophernakea/Library/Developer/Xcode/DerivedData/synctup-ciupgzhzpacjwohbhancqlvpjrgk/Build/Intermediates.noindex/synctup.build/Debug-iphonesimulator/synctup.build/Objects-normal/x86_64/synctup_lto.o 
        -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -Xlinker 
        -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker 
        /Users/christophernakea/Library/Developer/Xcode/DerivedData/synctup-ciupgzhzpacjwohbhancqlvpjrgk/Build/Intermediates.noindex/synctup.build/Debug-iphonesimulator/synctup.build/synctup.app.xcent 
        /Users/christophernakea/Documents/Projects/synctup/platforms/ios/build/emulator/libCordova.a -framework 
        GoogleMobileAds -framework AdSupport -framework StoreKit -framework CoreMotion -framework CoreImage -framework 
        QuartzCore -framework OpenGLES -framework Security -lc++ -lxml2 -framework FBAudienceNetwork -weak_framework 
        ImageIO -framework CoreLocation -framework AVFoundation -weak_framework AudioToolbox -lCordovaGenericAd 
        -framework CFNetwork -weak_framework SystemConfiguration -framework CoreTelephony -Xlinker -dependency_info 
        -Xlinker 
        /Users/christophernakea/Library/Developer/Xcode/DerivedData/synctup-ciupgzhzpacjwohbhancqlvpjrgk/Build/Intermediates.noindex/synctup.build/Debug-iphonesimulator/synctup.build/Objects-normal/x86_64/synctup_dependency_info.dat 
        -o /Users/christophernakea/Documents/Projects/synctup/platforms/ios/build/emulator/synctup.app/synctup
        duplicate symbol _OBJC_CLASS_$_CDVLogger in:

        /Users/christophernakea/Library/Developer/Xcode/DerivedData/synctup-ciupgzhzpacjwohbhancqlvpjrgk/Build/Intermediates.noindex/synctup.build/Debug-iphonesimulator/synctup.build/Objects-normal/x86_64/CDVLogger.o
             /Users/christophernakea/Documents/Projects/synctup/platforms/ios/build/emulator/libCordova.a(CDVLogger.o)
        duplicate symbol _OBJC_METACLASS_$_CDVLogger in:

        /Users/christophernakea/Library/Developer/Xcode/DerivedData/synctup-ciupgzhzpacjwohbhancqlvpjrgk/Build/Intermediates.noindex/synctup.build/Debug-iphonesimulator/synctup.build/Objects-normal/x86_64/CDVLogger.o
             /Users/christophernakea/Documents/Projects/synctup/platforms/ios/build/emulator/libCordova.a(CDVLogger.o)
        ld: 2 duplicate symbols for architecture x86_64
        clang: error: linker command failed with exit code 1 (use -v to see invocation)

        ** BUILD FAILED **

        The following build commands failed:
            Ld build/emulator/synctup.app/synctup normal x86_64
        (1 failure)
        Error: Error code 65 for command: xcodebuild with args: 
        -xcconfig,/Users/christophernakea/Documents/Projects/synctup/platforms/ios/cordova/build-debug.xcconfig,-workspace,synctup.xcworkspace,-scheme,synctup,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS 
        Simulator,name=iPhone 
        X,build,CONFIGURATION_BUILD_DIR=/Users/christophernakea/Documents/Projects/synctup/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/christophernakea/Documents/Projects/synctup/platforms/ios/build/sharedpch

Any insight into what could be going wrong, or any steps I can take to fix would be greatly appreciated.

Thanks!

rabruce commented 6 years ago

Might need to check your plugins. cordova-plugin-console got moved back into the Cordova core project for iOS.

http://cordova.apache.org/announcements/2017/09/08/ios-release.html

cordova plugin remove cordova-plugin-console

thesurya9 commented 6 years ago

Did anyone get a solution for this?

andrewaolwatson commented 6 years ago

+1 having the same issue

MFQ commented 6 years ago

+1 havig the same issue

kongen84 commented 6 years ago

+1 Have the same issue

SopoB commented 5 years ago

Facing same issues, not able to solve,. Please update here guys !!

SopoB commented 5 years ago

Just update your android build tools to latest ones and it will work :-)