Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pod install fails on macOS High Sierra #78

Closed
biomiker opened this issue Mar 1, 2018 · 60 comments
Closed

pod install fails on macOS High Sierra #78

biomiker opened this issue Mar 1, 2018 · 60 comments

Comments

@biomiker
Copy link

biomiker commented Mar 1, 2018

I'm running macOS High Sierra 10.13.3, XCode 9.2 (9C40b), and cocoapods 1.4.0. Running 'pod install' for 'GEOSwift' yields the following error. It seems to be purely related to the SVN export. I did notice that the geos project has transitioned from SVN to GIT (https://trac.osgeo.org/geos/wiki/CodeRepository). Has nobody else encountered this? How can we get our wonderful GEOSwift back under High Sierra? TIA!!!

Installing geos (3.5.0)

[!] Error installing geos
[!] /usr/bin/svn export --non-interactive --trust-server-cert --force https://svn.osgeo.org/geos/tags/3.5.0 /var/folders/n2/5vdk92sj48qgnvyw00jx0q480000gn/T/d20180301-15895-1qd8777

A    /var/folders/n2/5vdk92sj48qgnvyw00jx0q480000gn/T/d20180301-15895-1qd8777
...
A    /var/folders/n2/5vdk92sj48qgnvyw00jx0q480000gn/T/d20180301-15895-1qd8777/include/geos/geom/MultiPolygon.h
svn: E175013: Access to '/geos/!svn/rvr/4086/tags/3.5.0/include/geos/geom/GeometryCollection.h' forbidden
svn: E200042: Additional errors:
svn: E175013: Access to '/geos/!svn/rvr/4086/tags/3.5.0/include/geos/geom/Envelope.h' forbidden
svn: E175013: Access to '/geos/!svn/rvr/4086/tags/3.5.0/include/geos/geom/GeometryFactory.h' forbidden
svn: E175013: Access to '/geos/!svn/rvr/4086/tags/3.5.0/include/geos/geom/GeometryList.h' forbidden
svn: E175013: Access to '/geos/!svn/rvr/4086/tags/3.5.0/include/geos/geom/util/ShortCircuitedGeometryVisitor.h' forbidden
svn: E175013: Access to '/geos/!svn/rvr/4086/tags/3.5.0/include/geos/geom/util/PointExtracter.h' forbidden


@mojtabacazi
Copy link

Same issue here. I was thinking about creating a new podspec and change the source to the git repo.

@vfn
Copy link
Member

vfn commented Mar 1, 2018

@biomiker / @mojtabacazi would you guys like to fix this issue and then create a pull request with the working code?

@mojtabacazi
Copy link

@vfn I don't think it's fixable here, it seems like pod deosn't like SVN repos.

@vfn
Copy link
Member

vfn commented Mar 1, 2018

@mojtabacazi you can fix the geos pod and make it point to the git repo.

@biomiker
Copy link
Author

biomiker commented Mar 1, 2018

I wouldn't even know where to start. :(

For what it's worth, I feel like a workaround should be possible since the pod install works on older versions of macOS. And I don't even think it fails on every High Sierra install. But I don't really know where to start with that either. Definitely in need of help from experienced contributors/developers. Please?

@mojtabacazi
Copy link

This is a problem with SVN 1.9. SVN 1.7 works without problem

@mojtabacazi
Copy link

I created podspecs for geos and proj4. I had to bump the version to prevent conflict with master repo. Let me know if you know how to update pod master spec repo.

source 'https://github.com/mojtabacazi/Specs.git'

Note: GEOSwift still won't work because it explicitly asking for 3.5.0. But you can install spatialite from pods by adding my spec repo to your pod file

@biomiker
Copy link
Author

biomiker commented Mar 2, 2018

Thanks @mojtabacazi ... just curious, it looks like the git does have a 3.5.0 tag so why can't that be used? Any suggestions on how to install GEOSwift under High Sierra?

@mojtabacazi
Copy link

@biomiker Like I said if I use 3.5.0, cocoapod will complain about duplicate podspec. Not sure how I can tell it to use one vs the other.

@biomiker
Copy link
Author

biomiker commented Mar 2, 2018

Thanks, I should have gotten that from your previous comment. So possible solutions at this point are:

  1. Figure out how to update the pod master spec repo to replace the existing 3.5.0 spec with yours
    or
  2. Figure out how to specify in the podfile that GEOSwift 3.5.0 should be pulled from your repo and not the master repo.

Is that about right?

Would one possible workaround be to (perhaps continually) update our local clone of the pod master repo?

@biomiker
Copy link
Author

biomiker commented Mar 2, 2018

Okay so modifying the local clone works! I'm not sure if this is a good idea or not, but at least it allows the pod to install. The change is actually very simple:

-    "svn": "https://svn.osgeo.org/geos",
+    "git": "https://git.osgeo.org/gitea/geos/geos.git",

@ElnazTaqizadeh
Copy link

I did these changes, but keep getting this error:

[!] Unable to find a specification for 'geos'.

@vfn
Copy link
Member

vfn commented Mar 4, 2018

I have pushed a new version of geos pod, and GEOSwift develop branch is now using it. Please let me know if that fixes the issue.

@ElnazTaqizadeh
Copy link

ElnazTaqizadeh commented Mar 5, 2018

still returns a similar error as @biomiker mentioned.

[!] Error installing geos
[!] /usr/bin/svn export --non-interactive --trust-server-cert --force https://svn.osgeo.org/geos/tags/3.5.0 /var/folders/0d/x_1yr12n0l753kb9zf42298w0000gn/T/d20180305-2367-ar3d16

A    /var/folders/0d/x_1yr12n0l753kb9zf42298w0000gn/T/d20180305-2367-ar3d16
A    /var/folders/0d/x_1yr12n0l753kb9zf42298w0000gn/T/d20180305-2367-ar3d16/cmake
A    /var/folders/0d/x_1yr12n0l753kb9zf42298w0000gn/T/d20180305-2367-ar3d16/cmake/modules
A    /var/folders/0d/x_1yr12n0l753kb9zf42298w0000gn/T/d20180305-2367-ar3d16/debian
A    /var/folders/0d/x_1yr12n0l753kb9zf42298w0000gn/T/d20180305-2367-ar3d16/src
A    /var/folders/0d/x_1yr12n0l753kb9zf42298w0000gn/T/d20180305-2367-ar3d16/src/triangulate
A    /var/folders/0d/x_1yr12n0l753kb9zf42298w0000gn/T/d20180305-2367-ar3d16/src/triangulate/quadedge
A    /var/folders/0d/x_1yr12n0l753kb9zf42298w0000gn/T/d20180305-2367-ar3d16/src/algorithm
svn: E175013: Access to '/geos/!svn/rvr/4086/tags/3.5.0/src/triangulate/IncrementalDelaunayTriangulator.cpp' forbidden`

@mojtabacazi
Copy link

mojtabacazi commented Mar 5, 2018

@ElnazTaqizadeh can you copy your PodFile here?

@ElnazTaqizadeh
Copy link

 use_frameworks!
 pod 'GEOSwift', :git => 'https://github.com/GEOSwift/GEOSwift.git', :branch => 'develop'

@mojtabacazi
Copy link

mojtabacazi commented Mar 5, 2018

@ElnazTaqizadeh TL;DR This should work as is without problem. Of course you need YOUR_TARGET_NAME with actual target name.


source 'https://github.com/mojtabacazi/Specs.git'

inhibit_all_warnings!
use_frameworks!

target :YOUR_TARGET_NAME do
pod 'GEOSwift', :git => 'https://github.com/mojtabacazi/GEOSwift.git', :branch => 'develop'
end

@vfn Your podspec for geos is trying to build geos for all architecture which takes a long time and almost impossible to debug. Mine only runs the ./configure and let Xcode do the the heavy lifting.

@jwilson85
Copy link
Contributor

This did not work for me. when I included the
source 'https://github.com/mojtabacazi/Specs.git'
My other pods started failing

If I don't include it the install hangs

@mojtabacazi
Copy link

mojtabacazi commented Mar 5, 2018

@jwilson85 Copy your podfile here pls

Do you have source 'https://github.com/CocoaPods/Specs.git' in there?

@jwilson85
Copy link
Contributor

So I should put both
source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/mojtabacazi/Specs.git'
in there?

@jwilson85
Copy link
Contributor

I tried to add both to the pod file and ran a pod install.
I am back to it hanging at Installing geos (3.5.1)

@jwilson85
Copy link
Contributor

jwilson85 commented Mar 5, 2018

here is my current pod file

# Uncomment this line to define a global platform for your project
platform :ios, '9.0'

source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/mojtabacazi/Specs.git'

# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
    
def core_pods 
    
    pod 'Alamofire'
    pod 'SwiftyJSON', :git => 'https://github.com/appsailor/SwiftyJSON.git', :branch => 'swift3'
    pod 'SWXMLHash'
    pod 'GEOSwift', :git => 'https://github.com/mojtabacazi/GEOSwift.git', :branch => 'develop'
    pod 'GoogleAnalytics'   
    pod 'GooglePlaces'
    pod 'GooglePlacePicker'
    pod 'GoogleMaps'
    pod 'Google/SignIn'
    pod 'FacebookLogin'
    pod 'SDWebImage/WebP'
    pod 'Firebase/Core'
    pod 'Firebase/Auth'
    pod 'Firebase/Messaging'
    pod 'SwiftWebViewProgress'
    pod 'FBAnnotationClusteringSwift', :git => 'https://github.com/ribl/FBAnnotationClusteringSwift.git'
    
end

target 'iOS-Core' do
    core_pods
end

target 'iOS-Core-beta' do
    core_pods
end

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['SWIFT_VERSION'] = '3.0'
        end
    end
end

@mojtabacazi
Copy link

mojtabacazi commented Mar 5, 2018

@jwilson85 Your podfile looks fine, tho I had sources in reversed order, mine first.
configuring geos takes a long time that's why I said use pod update --verbose so you can see what's happening.

[Update] I noticed geos in master podspec got updated to 3.5.1, chances are yours is getting that which takes forever to compile.

[Update 2] My podspec repo is work in progress. I'm updating geos to 3.6.2 at the moment.

@vfn
Copy link
Member

vfn commented Mar 5, 2018

@mojtabacazi when you have a working geos podspec, create a PR on https://github.com/GEOSwift/geos and I can update the main pod.

I'm not using GEOSwift/geos at the time, so I'm not maintaining them. If you are using and have interest on actively maintaining, I can add you as a collaborator.

@mojtabacazi
Copy link

@vfn Sure I can fix this issue.

@jwilson85
Copy link
Contributor

jwilson85 commented Mar 6, 2018

@mojtabacazi So I did what you suggested. And I dont understand whats happening. The other pods will say they don't exist when I goto build from xCode. Alternatively, if I copy in the GEOSwift folder into my pods folder. Then run a pod install everything works.

@himi1
Copy link

himi1 commented Mar 6, 2018

Yes. I created a sample app to display .geo.json on a view controller.

Here's the full podfile:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/mojtabacazi/Specs.git'

target 'test123' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for test123
  pod 'GEOSwift', :git => 'https://github.com/mojtabacazi/GEOSwift.git', :branch => 'develop'

  target 'test123Tests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'test123UITests' do
    inherit! :search_paths
    # Pods for testing
  end

end

@jwilson85
Copy link
Contributor

@himi1 Did you also run
brew link libxml2

@himi1
Copy link

himi1 commented Mar 6, 2018

oh. I did not do that.

It's giving me this warning:

Warning: libxml2 is keg-only and must be linked with --force
Note that doing so can interfere with building software.

If you need to have this software first in your PATH instead consider running:
  echo 'export PATH="/usr/local/opt/libxml2/bin:$PATH"' >> ~/.bash_profile

@jwilson85
Copy link
Contributor

try running
brew install automake autoconf libtool libxml2 pkg-config again and then
brew link libxml2

@himi1
Copy link

himi1 commented Mar 6, 2018

I ran the following command to link it now:

brew link --force libxml2

But xcode errors persist.

@jwilson85
Copy link
Contributor

jwilson85 commented Mar 6, 2018

Ya im still having other libs give linker errors. I'm no longer getting a pod install error. which was what I thought was giving me the errors on other libs. Xcode just got to them first I thought. And since pods failed it didn't install any.

@himi1
Copy link

himi1 commented Mar 6, 2018

@jwilson85 : What are the errors that you are getting?

@jwilson85
Copy link
Contributor

jwilson85 commented Mar 6, 2018

ld: framework not found GoogleMaps clang: error: linker command failed with exit code 1 (use -v to see invocation)

I tried to add framework search path that didn't work either.

@himi1
Copy link

himi1 commented Mar 6, 2018

Try deleting ~/Library/Developer/Xcode/DerivedData and then delete Podfile.lock file. Finally, run pod install once again.

@jwilson85
Copy link
Contributor

jwilson85 commented Mar 6, 2018

Hey! that seems to have worked. I deleted podfile.lock the pods folder and cleared DerivedData.
Then did a pod install
It's building now. TY!
@himi1

@himi1
Copy link

himi1 commented Mar 7, 2018

@jwilson85 : My pleasure.

May you copy paste your podfile please? I am still unable to fix my xcode errors.

@jwilson85
Copy link
Contributor

jwilson85 commented Mar 7, 2018

@himi1 sure

# Uncomment this line to define a global platform for your project
platform :ios, '9.0'

source 'https://github.com/mojtabacazi/Specs.git'
source 'https://github.com/CocoaPods/Specs.git'

# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
    
def core_pods 
    
    pod 'Alamofire'
    pod 'SwiftyJSON', :git => 'https://github.com/appsailor/SwiftyJSON.git', :branch => 'swift3'
    pod 'SWXMLHash'
    pod 'GoogleAnalytics'   
    pod 'GooglePlaces'
    pod 'GooglePlacePicker'
    pod 'GoogleMaps'
    pod 'Google/SignIn'
    pod 'FacebookLogin'
    pod 'SDWebImage/WebP'
    pod 'Firebase/Core'
    pod 'Firebase/Auth'
    pod 'Firebase/Messaging'
    pod 'SwiftWebViewProgress'
    pod 'FBAnnotationClusteringSwift', :git => 'https://github.com/ribl/FBAnnotationClusteringSwift.git'
    pod 'GEOSwift', :git => 'https://github.com/mojtabacazi/GEOSwift.git', :branch => 'develop'

end

target 'iOS-Core' do
    core_pods
end

target 'iOS-Core-beta' do
    core_pods
end

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['SWIFT_VERSION'] = '4.0'
        end
    end
end

@dan-burt
Copy link

dan-burt commented Mar 12, 2018

I'm having issues installing GeoSwift on Sierra 10.12.6, XCode 9.2, Cocoapods 1.4.0.

Podfile:

project 'GeoSwift Sample.xcodeproj'

platform :ios, '9.0'

source 'https://github.com/mojtabacazi/Specs.git'
source 'https://github.com/CocoaPods/Specs.git'

target 'GeoSwift Sample' do
  use_frameworks!

  pod 'GEOSwift', :git => 'https://github.com/mojtabacazi/GEOSwift.git', :branch => 'develop'

end

Console reports:

Analyzing dependencies
Pre-downloading: `GEOSwift` from `https://github.com/mojtabacazi/GEOSwift.git`, branch `develop`
Downloading dependencies
Installing GEOSwift (2.1.3)
Installing geos (3.6.2)
[!] /bin/bash -c 
set -e
type -P autoconf &>/dev/null || alias autoconf 'xcrun autoconf'
type -P autoheader &>/dev/null || alias autoheader 'xcrun autoheader'
type -P aclocal &>/dev/null || alias aclocal 'xcrun aclocal'
type -P automake &>/dev/null || alias automake 'xcrun automake'
type -P glibtool &>/dev/null || alias glibtool 'xcrun glibtool'
type -P glibtoolize &>/dev/null || alias glibtoolize 'xcrun glibtoolize'

sh autogen.sh
./configure
./tools/repo_revision.sh

sed -i "" "s/\/\* #undef HAVE_INT64_T_64 \*\//#define HAVE_INT64_T_64 1/" include/geos/platform.h
sed -i "" "s/#define HAVE_LONG_INT_64 1/\/\* #undef HAVE_LONG_INT_64 \*\//" include/geos/platform.h

cat <<EOT >> include/geos/platform.h
  #undef ISNAN
  #define ISNAN(x) (std::isnan(x))
EOT

 patch capi/geos_c.h <<EOF
  149c149
  < #include <geos/export.h>
  ---
  > #define GEOS_DLL
EOF

/bin/bash: line 2: alias: autoconf: not found
/bin/bash: line 2: alias: xcrun autoconf: not found


I have brew installed, and run:

brew install automake autoconf libtool libxml2 pkg-config again and then
brew link --force libxml2

how can i fix this? Thought it shouldn't be this hard with cocoapods!

@jwilson85
Copy link
Contributor

@dan-burt did you happen to past the last part of the brew install command into your console. Sorry for the dumb question

@dan-burt
Copy link

@jwilson85 sorry, the terminal session has already been closed

@jwilson85
Copy link
Contributor

@dan-burt just checking to make sure you didn’t past the “again and then” into terminal

@dan-burt
Copy link

@jwilson85 , sorry I had mis-read your question. No I definitely did not include the "again and then" into the command string

@ElnazTaqizadeh
Copy link

Every time I update pod for other dependencies the problem appears with different error!This is the new swift compile error:

 error: module 'geos' not found
 @import geos;
         ^
 <unknown>:0: error: could not build Objective-C module 'GEOSwift'

I tried several ways like clean + build, change the scheme to dependency, delete derived data, none of them worked.

@rickmark
Copy link

Hey guys, I had a similar problem with /bin/bash: line 2: alias: autoconf: not found

So, I was using the CocoaPods application, then tried the pod update command (which turns out calls into the application for the version of cocoapods)

I uninstalled the app, installed cocoapods as a gem, and then was able to successfully install and update the app.

This must be something about sub-shells created by the app and not having homebrew's autoconf on the path.

So, again, my setup:

  • Install homebrew
  • brew install rbenv
  • Include eval "$(rbenv init -)" in .bash_profile
  • rbenv install 2.5.0
  • rbenv system 2.5.0
  • gem update --system
  • gem install cocoapods
  • pod update

@Obiwan78
Copy link

Obiwan78 commented Sep 4, 2018

Hi Everybody, I have some troubles with this package :

I'm running macOS High Sierra 10.13.3, XCode 9.4.1 (9F2000), and cocoapods 1.5.2.

Here the result of my terminal window :

18macbookrj:BuBus alban$ brew install automake autoconf libtool libxml2 pkg-config
Warning: automake 1.16.1_1 is already installed and up-to-date
To reinstall 1.16.1_1, run brew reinstall automake
Warning: autoconf 2.69 is already installed and up-to-date
To reinstall 2.69, run brew reinstall autoconf
Warning: libtool 2.4.6_1 is already installed and up-to-date
To reinstall 2.4.6_1, run brew reinstall libtool
Warning: libxml2 2.9.7 is already installed and up-to-date
To reinstall 2.9.7, run brew reinstall libxml2
Warning: pkg-config 0.29.2 is already installed and up-to-date
To reinstall 0.29.2, run brew reinstall pkg-config
18macbookrj:BuBus alban$ brew link libxml2
Warning: libxml2 is keg-only and must be linked with --force

If you need to have this software first in your PATH instead consider running:
echo 'export PATH="/usr/local/opt/libxml2/bin:$PATH"' >> ~/.bash_profile
18macbookrj:BuBus alban$ brew link --force libxml2
Linking /usr/local/Cellar/libxml2/2.9.7... 21 symlinks created

If you need to have this software first in your PATH instead consider running:
echo 'export PATH="/usr/local/opt/libxml2/bin:$PATH"' >> ~/.bash_profile
18macbookrj:BuBus alban$ pod install
Analyzing dependencies
Pre-downloading: GEOSwift from https://github.com/GEOSwift/GEOSwift.git, branch develop
**[!] CocoaPods could not find compatible versions for pod "geos":
In Podfile:
GEOSwift (from https://github.com/GEOSwift/GEOSwift.git, branch develop) was resolved to 2.2.0, which depends on
geos (= 3.5.0)

None of your spec sources contain a spec satisfying the dependency: geos (= 3.5.0).

You have either:

  • out-of-date source repos which you can update with pod repo update or with pod install --repo-update.
  • mistyped the name or version.
  • not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, pod repo update does not happen on pod install by default.**

Could you please help me ?
How canI install GEOSwift ?

@macdrevx
Copy link
Member

macdrevx commented Sep 4, 2018

@Obiwan78 did you try $ pod repo update?

@Obiwan78
Copy link

Obiwan78 commented Sep 5, 2018

Yes I do.
It works with a simulator (iPhone X IOs 11.4) but does not with my iPhone.

Here the result for simulator or with my iPhone
image

@macdrevx
Copy link
Member

macdrevx commented Sep 5, 2018

@Obiwan78 based on that screenshot, it looks like you were able to install the SDK. Having a bunch of warnings is, unfortunately, typical at the moment. Do you have any build errors?

@Obiwan78
Copy link

Obiwan78 commented Sep 6, 2018

No, no mistake of build constrcution.
How is it possible to remove these errors?

@macdrevx
Copy link
Member

macdrevx commented Sep 6, 2018

If you just want to ignore the warnings, you can update your podfile:

pod 'GEOSwift', :inhibit_warnings => true
pod 'geos', :inhibit_warnings => true

After you change you're Podfile, you'll just have to run $ pod install again for the changes to take effect.

@Obiwan78
Copy link

Obiwan78 commented Sep 7, 2018

Thanks a lot for your answer. It's good now.

@macdrevx
Copy link
Member

macdrevx commented Oct 8, 2018

Hi all, many of these issues have been resolved with GEOSwift 3.0.0 / geos 3.7.0. Give them a try and open new tickets if you run into any problems. I'm closing this one since it's gotten a bit long and hard to follow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants