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

Unable to install fastrtps #16

Closed
meteor0530 opened this issue Sep 1, 2017 · 9 comments
Closed

Unable to install fastrtps #16

meteor0530 opened this issue Sep 1, 2017 · 9 comments

Comments

@meteor0530
Copy link

==> Installing px4-dev from px4/px4
==> Installing dependencies for px4/px4/px4-dev: fastrtps
==> Installing px4/px4/px4-dev dependency: fastrtps
==> Downloading http://px4-tools.s3.amazonaws.com/fastrtps-v1.5.0p.tar.gz
######################################################################## 100.0%
==> Patching
patching file CMakeLists.txt
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 373 with fuzz 1.
==> cmake -DTHIRDPARTY=ON -DBUILD_JAVA=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/Cellar/fastrtps/1.5.0 ..
==> make
Last 15 lines from /Users/meteor/Library/Logs/Homebrew/fastrtps/02.make:
[ 86%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/rtps/builtin/data/ReaderProxyData.cpp.o
[ 88%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/rtps/flowcontrol/ThroughputController.cpp.o
[ 89%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/rtps/flowcontrol/ThroughputControllerDescriptor.cpp.o
[ 90%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/rtps/flowcontrol/FlowController.cpp.o
[ 91%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/rtps/exceptions/Exception.cpp.o
[ 92%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/rtps/attributes/PropertyPolicy.cpp.o
[ 93%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/rtps/common/Token.cpp.o
[ 94%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/xmlparser/XMLParserCommon.cpp.o
[ 95%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/xmlparser/XMLProfileElementParser.cpp.o
[ 96%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/xmlparser/XMLEndpointParser.cpp.o
[ 97%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/xmlparser/XMLProfileParser.cpp.o
[ 98%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/__/__/thirdparty/tinyxml2/tinyxml2.cpp.o
[100%] Linking CXX shared library libfastrtps.dylib
[100%] Built target fastrtps
make: *** [all] Error 2

@fabianschilling
Copy link

fabianschilling commented Sep 28, 2017

==> Installing px4-dev from px4/px4
==> Installing dependencies for px4/px4/px4-dev: fastrtps, fastcdr
==> Installing px4/px4/px4-dev dependency: fastrtps
==> Downloading http://px4-tools.s3.amazonaws.com/fastrtps-v1.5.0p.tar.gz
Already downloaded: /Users/fabian/Library/Caches/Homebrew/fastrtps-1.5.0.tar.gz
==> Patching
patching file CMakeLists.txt
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 373 with fuzz 1.
==> cmake -DTHIRDPARTY=ON -DBUILD_JAVA=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/Cellar/fastrtps/1.5
Last 15 lines from /Users/fabian/Library/Logs/Homebrew/fastrtps/01.cmake:


CMake Error at /usr/local/Cellar/cmake/3.9.3_1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Java: Found unsuitable version "..", but required is at
  least "1.6" (found
  /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/java)
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.9.3_1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:375 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/Cellar/cmake/3.9.3_1/share/cmake/Modules/FindJava.cmake:243 (find_package_handle_standard_args)
  cmake/dev/java_support.cmake:16 (find_package)
  CMakeLists.txt:226 (gradle_build)

@KochC
Copy link

KochC commented Oct 5, 2017

Had the same issues like @fabianschilling . Solved it by downgrading to Java 1.6.
Could NOT find Java: Found unsuitable version "..", but required is at least "1.6"

Also solved the issue from @meteor0530 by installing Java 1.8 from here which is the source described in the manual.

But, got a new issue (solved):

Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink include/fastcdr
/usr/local/include is not writable.

Solved it by setting correct rights:
sudo chown -R whoami /usr/local

@zrfrank
Copy link

zrfrank commented Oct 5, 2017

UNKNOWN ERROR DURING INSTALL


System: MacOS High Sierra 10.13

Java: Installed the lasted Java 9, but I switched to both version 1.7, 1.8 as recommended by @KochC, using command, i.e., switch to java version 1.8 by,

frankmbp:~ appleapple$ export JAVA_HOME=/usr/libexec/java_home -v 1.8
frankmbp:~ appleapple$ java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

-------- The error messages during installation of brew install px4-dev -------------
brew install px4-dev
Updating Homebrew...
==> Installing px4-dev from px4/px4
==> Installing dependencies for px4/px4/px4-dev: fastrtps, fastcdr
==> Installing px4/px4/px4-dev dependency: fastrtps
==> Downloading http://px4-tools.s3.amazonaws.com/fastrtps-v1.5.0p.tar.gz
Already downloaded: /Users/appleapple/Library/Caches/Homebrew/fastrtps-1.5.0.tar.gz
==> Patching
patching file CMakeLists.txt
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 373 with fuzz 1.
==> cmake -DTHIRDPARTY=ON -DBUILD_JAVA=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr/local
==> make
Last 15 lines from /Users/appleapple/Library/Logs/Homebrew/fastrtps/02.make:
[ 86%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/rtps/builtin/data/ReaderProxyData.cpp.o
[ 88%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/rtps/flowcontrol/ThroughputController.cpp.o
[ 89%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/rtps/flowcontrol/ThroughputControllerDescriptor.cpp.o
[ 90%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/rtps/flowcontrol/FlowController.cpp.o
[ 91%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/rtps/exceptions/Exception.cpp.o
[ 92%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/rtps/attributes/PropertyPolicy.cpp.o
[ 93%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/rtps/common/Token.cpp.o
[ 94%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/xmlparser/XMLParserCommon.cpp.o
[ 95%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/xmlparser/XMLProfileElementParser.cpp.o
[ 96%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/xmlparser/XMLEndpointParser.cpp.o
[ 97%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/xmlparser/XMLProfileParser.cpp.o
[ 98%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir///thirdparty/tinyxml2/tinyxml2.cpp.o
[100%] Linking CXX shared library libfastrtps.dylib
[100%] Built target fastrtps
make: *** [all] Error 2

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/px4/homebrew-px4/issues

These open issues may also help:
Unable to install fastrtps #16

@sleddriver
Copy link

I have this issue as well on High Sierra, I have tried to reinstall java and this several times with the same result.

@tops4u
Copy link

tops4u commented Oct 26, 2017

Same problem here, also with High Sierra.

@LorenzMeier I think this is a High Sierra related Problem.

@tops4u
Copy link

tops4u commented Nov 13, 2017

I think I found a workaround for this Problem.

brew cask install java

will install JAVA9 and there is a Class Name Collision (java.lang.Module) so that part of fastrtps build fails and in sequence the linker. I got it working by uninstalling Java 9 and manually installing the JAVA 8 JDK Version from the Oracle site.

Also there was a Problem installing jinja2 so I had to modify the installation command to : sudo -H pip install pyserial jinja2

which worked well for me.

@LorenzMeier
Copy link
Member

Could you please update from Home-brew and see if that resolves your issue? I avoided building with JAVA by adding a new bottle: bd6519b

@ChristophTobler
Copy link

Now works for high-sierra with latest master. @LorenzMeier thanks!

@ChristophTobler
Copy link

@meteor0530 Please reopen if it's still an issue for you.

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

No branches or pull requests

8 participants