Travis swift library compilation error - swift

I'm trying to fix an error I have been getting from my Travis build lately and cannot seem to fix the issue:
The following build commands failed:
CompileSwift normal i386 /Users/travis/build/HarrisonEllerm/My-Pain-Manager/Pods/SwiftCharts/SwiftCharts/Layers/ChartPointsViewsLayer.swift
CompileSwiftSources normal i386 com.apple.xcode.tools.swift.compiler
(2 failures)
Everything else compiles just fine but this library for some reason throws an error each time. Does anyone know a possible solution to this problem (maybe telling Travis just to ignore the library?). It fails each time on that particular file, but I can open it up in Xcode no problem and it builds just fine locally.
Link to build: https://travis-ci.org/HarrisonEllerm/My-Pain-Manager
I have seen Get Travis CI to ignore an external library? but unfortunately no luck.
Cheers

I think you should add pod install command to your travis.yml file.
Updated before_install part:
before_install:
- rvm install ruby-2.2.2
- gem install cocoapods
- gem install xcpretty -N
- brew update
- brew install swiftlint || true #need to clean up project at some stage using swiftlint
- pod repo update
- pod install

Related

How can I solve this error and install cocoapods?

In my terminal I use:
sudo gem install cocoapods
My terminal gives the error shown below. How can I solve this? I have tried a few variations and I cannot get it to work.
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.12.2/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20200518-1427-ajbhbt.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/include/ruby.h
You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.12.2 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.12.2/gem_make.out
Agree with Vinayaka and Bryan you're missing some ruby header files and it looks like they're required. Not sure about your environment setup but it may help to just reinstall the latest Xcode from scratch.
Also, I've had some recent problems with Cocoapods installed via terminal. The terminal installs the latest build of Cocoapods. If you're looking for something stable then maybe try the Cocoapods app. It's clunky and it can't read pod files from the latest version of Cocoapods (so you'll have to regenerate any existing podfiles) but its easier to work with especially for those who prefer a graphical environment.
We need to install Xcode's developer tools. The easiest way to do this is through terminal .
xcode-select --install
Later, if there are any write permission issues, use the below code.
sudo gem install cocoapods -n /usr/local/bin/..
P.S: -n specifies the directory where binaries are located.
Please try with
brew install cocoapods

Fastlane "nokogiri requires Ruby version >= 2.3.0." Error

I finished this tutorial on Medium in order to integrate my Xcode project with SonarQube to have some metrics. Setup SonarQube - Swift. I was able to make it through the last step that is: running fastlane metrics on the terminal while being in the root of the project directory. But I get this error on step "slather".
nokogiri requires Ruby version >= 2.3.0., fastlane finished with errors:
I have also found that someone had a similar question here, but no answers:
Similar Question
If I run:
nicolas$ ruby --version
I get ruby version 2.6.3, which is higher than the required 2.3
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
Does anyone knows how to fix this, or got any hunches? Thanks in advance, I appreciate any help.
After digging around and trying several solutions, I finally solved this. What happened was that I initially installed Fastlane with this command:
brew cask install Fastlane
And it seems that it was using another version of ruby while I had a newer one. So I uninstalled it with:
brew cask uninstall Fastlane
And then I re-installed it with this command:
sudo gem install -n /usr/local/bin fastlane -NV
Because I was having problems with permissions and then all worked good.
References and other solutions:
Github thread
usr/local/bin

vscode assistance with building cpptools needed

Ubuntu 18.04 ARM64
I have download and built vscode and this appears to be working.
I can see the extension market place and install extensions. The C/C++ IntelliSense, debugging, and code browsing install but gets a dependency install failure sometimes:
Updating C/C++ dependencies...
Downloading package 'Mono Framework Assemblies' (5368 KB) Done!
Installing package 'Mono Framework Assemblies'
Failed at stage: installPackages
Error: end of central directory record signature not found
It seems to succeed on the second attempt but I'm not convinced.
So I have cloned vscode-cpptools and would like to built it myself but I'm not sure what dependencies it has or how to build it correctly.
Any tips appreciated!
So following the build and debug guide at:
$ git clone -b release https://github.com/Microsoft/vscode-cpptools
$ cd vscode-cpptools/Extension
$ npm install ! should install all dependencies but it forgets gulp
$ npm install gulp ! Manually install. I wonder what else it forgets
$ vsce package ! Should trigger the build and make the vsix package.
So the package is created and when I try and install it via the vscode extensions I get
Unable to start the C/C++ language server. IntelliSense features will be disabled. Error: Missing binary at ~/.vscode-oss-dev/extensions/ms-vscode.cpptools-0.22.1/bin/Microsoft.VSCode.CPP.Extension.linux.
Me thinks there are a lot of other dependencies that are missing!!!
Looking in the Extension bin folder and two important binaries are missing:
Microsoft.VSCode.CPP.Extension.linux
Microsoft.VSCode.CPP.IntelliSense.Msvc.linux
I also tried this on Intel Ubuntu 18.04 and while the Intel build appeared to do a whole lot more it also fails to build the binaries.
Found the answer in here : github.com/Microsoft/vscode-cpptools/issues/429 which indicates there is no support for Aaarch64 Arm64 at this point in time.

Cannot install php7-mongodb in alpine linux

I am trying to install php7-mongodb with my dockerfile. The same worked until yesterday but today dockerbuild is throwing the following error
Step 4/12 : RUN apk add php7-mongodb
---> Running in b6713ea15c9d
php7-mongodb (missing):
ERROR: unsatisfiable constraints:
required by: world[php7-mongodb]
The command '/bin/sh -c apk add php7-mongodb' returned a non-zero code: 1
I tried with apk update and apk upgrade in the dockerfile but still not working. any idea what the issue is?
I am using alpine edge as base version.
We can recreate the issue by using the following dockerfile
FROM alpine:edge
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN apk update && apk upgrade
RUN apk add php7-mongodb
tldr: The package renamed to php7-pecl-mongodb in 3.9 and no longer exists in later releases
The package was renamed to php7-pecl-mongodb with this commit: https://git.alpinelinux.org/aports/commit/?id=b3d534d73c690baf458d9cda5dca5ee52ca9cafc
But the package was removed shortly after that due to a nonfree licence change by the package: https://git.alpinelinux.org/aports/commit/community/php7-pecl-mongodb/APKBUILD?id=8a901de31fa055ed591d487e12f8bb9ffcc0df21
According to https://pkgs.alpinelinux.org/packages?name=php7-mongodb&branch=edge there is no such package in alpine edge version.
The latest alpine version that has the php7-mongodb package in its repos seems to be 3.8: https://pkgs.alpinelinux.org/packages?name=php7-mongodb&branch=v3.8
I can't tell you what's the reason that this package is not contained in 3.9 and edge. But if this is an option for you use alpine:3.8 as the base image instead of alpine:edge
Using Alpine 3.8 will fix the issue for you. Change
FROM alpine:edge
To
FROM alpine:3.8
You will also need to change the repository URL so it's point at v3.8. I've been using main so the second line would look like below for me.
RUN echo "http://dl-cdn.alpinelinux.org/alpine/v3.8/main" >> /etc/apk/repositories
I don't think /testing exists for older releases so you'll need to experiment to find out what works for you. Or perhaps someone else can clarify this for us.
It means you're not using the latest Alpine but you will be able to build the container.

error: SERVER does not appear in AM_CONDITIONAL

I am trying to install Lustre on CentOS 7. I followed this link. When I try to run sh ./autogen.sh to generate the configure script I get the above error as illustrated below.
[root#localhost lustre-release]# sh ./autogen.sh
configure.ac:10: installing 'config/config.guess'
configure.ac:10: installing 'config/config.sub'
configure.ac:12: installing 'config/install-sh'
configure.ac:12: installing 'config/missing'
autoMakefile.am:127: error: SERVER does not appear in AM_CONDITIONAL
libcfs/libcfs/autoMakefile.am: installing 'config/depcomp'
Does anyone know how I can resolve this?
To build lustre from git use "autogen.sh" in the top level directory to setup the build environment:
$ bash autogen.sh
libcfs/libcfs/autoMakefile.am: installing 'config/depcomp'
$
Did you try downloading a pre-built package from https://downloads.whamcloud.com/public/lustre/ ? That is usually the easiest compared to building your own.
If you want to build your own Lustre code, which version of the source are you using? The latest code is available at git.whamcloud.com. Most users should use the LTS release (b2_10 branch currently), but if you are doing new development you should use the master branch.