OSVR / Homebrew-OSVR

Mac OS X Homebrew tap for OSVR
14 stars 9 forks source link

Could not find a package configuration file provided by "jsoncpp" with any #4

Closed wizztjh closed 8 years ago

wizztjh commented 8 years ago

Tried to install osvr but having this problem


  Could not find a package configuration file provided by "jsoncpp" with any
  of the following names:

    jsoncppConfig.cmake
    jsoncpp-config.cmake

  Add the installation prefix of "jsoncpp" to CMAKE_PREFIX_PATH or set
  "jsoncpp_DIR" to a directory containing one of the above files.  If
  "jsoncpp" provides a separate development package or SDK, be sure it has
  been installed.
d235j commented 8 years ago

Can you run brew uninstall jsoncpp, followed by brew update, brew upgrade, and then try installing again?

wizztjh commented 8 years ago
brew uninstall jsoncpp
Error: No such keg: /usr/local/Cellar/jsoncpp

after I brew install jsoncpp and brew install hidapi It proceed with cmake

wizztjh commented 8 years ago

Now I am having this problem.

==> Checking out branch master
Synchronizing submodule url for 'submodules/hidapi'
Synchronizing submodule url for 'submodules/jsoncpp'
==> cmake .. -DCMAKE_C_FLAGS_RELEASE= -DCMAKE_CXX_FLAGS_RELEASE= -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/osvr-core
==> make install
Last 15 lines from /Users/teejiahen/Library/Logs/Homebrew/osvr-core/02.make:
cd /tmp/osvr-core20151201-45520-1i8263d/build/src/osvr/Common && /usr/local/Library/ENV/4.3/clang++   -DEIGEN_MPL2_ONLY -DVRPN_USING_CMAKE=\"/tmp/osvr-core20151201-45520-1i8263d/build/vendor/vrpn/vrpn_Configure.h\" -DosvrCommon_EXPORTS -I/usr/local/include/opencv -I/usr/local/include -I/tmp/osvr-core20151201-45520-1i8263d/build/src -I/tmp/osvr-core20151201-45520-1i8263d/inc -isystem /usr/local/Cellar/jsoncpp/0.10.5/include -I/tmp/osvr-core20151201-45520-1i8263d/build/vendor/vrpn -I/tmp/osvr-core20151201-45520-1i8263d/vendor/vrpn -I/tmp/osvr-core20151201-45520-1i8263d/vendor/vrpn/atmellib -I/tmp/osvr-core20151201-45520-1i8263d/vendor/vrpn/quat -I/tmp/osvr-core20151201-45520-1i8263d/vendor/eigen-3.2.7  -arch i386 -arch x86_64 -fPIC    -W -Wall -Wextra -std=c++11 -o CMakeFiles/osvrCommon.dir/NetworkingSupport.cpp.o -c /tmp/osvr-core20151201-45520-1i8263d/src/osvr/Common/NetworkingSupport.cpp
[ 80%] Building CXX object src/osvr/Common/CMakeFiles/osvrCommon.dir/NormalizeDeviceDescriptor.cpp.o
cd /tmp/osvr-core20151201-45520-1i8263d/build/src/osvr/Common && /usr/local/Library/ENV/4.3/clang++   -DEIGEN_MPL2_ONLY -DVRPN_USING_CMAKE=\"/tmp/osvr-core20151201-45520-1i8263d/build/vendor/vrpn/vrpn_Configure.h\" -DosvrCommon_EXPORTS -I/usr/local/include/opencv -I/usr/local/include -I/tmp/osvr-core20151201-45520-1i8263d/build/src -I/tmp/osvr-core20151201-45520-1i8263d/inc -isystem /usr/local/Cellar/jsoncpp/0.10.5/include -I/tmp/osvr-core20151201-45520-1i8263d/build/vendor/vrpn -I/tmp/osvr-core20151201-45520-1i8263d/vendor/vrpn -I/tmp/osvr-core20151201-45520-1i8263d/vendor/vrpn/atmellib -I/tmp/osvr-core20151201-45520-1i8263d/vendor/vrpn/quat -I/tmp/osvr-core20151201-45520-1i8263d/vendor/eigen-3.2.7  -arch i386 -arch x86_64 -fPIC    -W -Wall -Wextra -std=c++11 -o CMakeFiles/osvrCommon.dir/NormalizeDeviceDescriptor.cpp.o -c /tmp/osvr-core20151201-45520-1i8263d/src/osvr/Common/NormalizeDeviceDescriptor.cpp
[ 80%] Building CXX object src/osvr/Common/CMakeFiles/osvrCommon.dir/OriginalSource.cpp.o
cd /tmp/osvr-core20151201-45520-1i8263d/build/src/osvr/Common && /usr/local/Library/ENV/4.3/clang++   -DEIGEN_MPL2_ONLY -DVRPN_USING_CMAKE=\"/tmp/osvr-core20151201-45520-1i8263d/build/vendor/vrpn/vrpn_Configure.h\" -DosvrCommon_EXPORTS -I/usr/local/include/opencv -I/usr/local/include -I/tmp/osvr-core20151201-45520-1i8263d/build/src -I/tmp/osvr-core20151201-45520-1i8263d/inc -isystem /usr/local/Cellar/jsoncpp/0.10.5/include -I/tmp/osvr-core20151201-45520-1i8263d/build/vendor/vrpn -I/tmp/osvr-core20151201-45520-1i8263d/vendor/vrpn -I/tmp/osvr-core20151201-45520-1i8263d/vendor/vrpn/atmellib -I/tmp/osvr-core20151201-45520-1i8263d/vendor/vrpn/quat -I/tmp/osvr-core20151201-45520-1i8263d/vendor/eigen-3.2.7  -arch i386 -arch x86_64 -fPIC    -W -Wall -Wextra -std=c++11 -o CMakeFiles/osvrCommon.dir/OriginalSource.cpp.o -c /tmp/osvr-core20151201-45520-1i8263d/src/osvr/Common/OriginalSource.cpp
[ 80%] Building CXX object src/osvr/Common/CMakeFiles/osvrCommon.dir/ParseAlias.cpp.o
cd /tmp/osvr-core20151201-45520-1i8263d/build/src/osvr/Common && /usr/local/Library/ENV/4.3/clang++   -DEIGEN_MPL2_ONLY -DVRPN_USING_CMAKE=\"/tmp/osvr-core20151201-45520-1i8263d/build/vendor/vrpn/vrpn_Configure.h\" -DosvrCommon_EXPORTS -I/usr/local/include/opencv -I/usr/local/include -I/tmp/osvr-core20151201-45520-1i8263d/build/src -I/tmp/osvr-core20151201-45520-1i8263d/inc -isystem /usr/local/Cellar/jsoncpp/0.10.5/include -I/tmp/osvr-core20151201-45520-1i8263d/build/vendor/vrpn -I/tmp/osvr-core20151201-45520-1i8263d/vendor/vrpn -I/tmp/osvr-core20151201-45520-1i8263d/vendor/vrpn/atmellib -I/tmp/osvr-core20151201-45520-1i8263d/vendor/vrpn/quat -I/tmp/osvr-core20151201-45520-1i8263d/vendor/eigen-3.2.7  -arch i386 -arch x86_64 -fPIC    -W -Wall -Wextra -std=c++11 -o CMakeFiles/osvrCommon.dir/ParseAlias.cpp.o -c /tmp/osvr-core20151201-45520-1i8263d/src/osvr/Common/ParseAlias.cpp
/tmp/osvr-core20151201-45520-1i8263d/src/osvr/Common/ParseAlias.cpp:77:16: error: no member named 'omitEndingLineFeed' in 'Json::FastWriter'
        writer.omitEndingLineFeed();
        ~~~~~~ ^
1 error generated.
make[2]: *** [src/osvr/Common/CMakeFiles/osvrCommon.dir/ParseAlias.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [src/osvr/Common/CMakeFiles/osvrCommon.dir/all] Error 2
make: *** [all] Error 2
wizztjh commented 8 years ago

I guess it is not using submodules/jsoncpp, instead it uses jsoncpp from brew. It is a osvr-core issue?

http://diracprogram.org/doc/release-12/programmers/external_projects.html

gching commented 8 years ago

:+1: Been getting this problem too. I think it's because OSVR doesn't include jsoncpp as a submodule, or are you already handling this?

gching commented 8 years ago

Okay, figured it out! So whats happening is OSVR does not include jsoncpp as a submodule and you have to install it separately with brew. With that said, you need the most up to date version as older versions do not contain omitEndingLineFeed. Use brew install jsoncpp --HEAD.

@d235j I think we should add a dependency in the formula for jsoncpp. I can do it later when I'm not busy as it needs to be confirmed.

godbyk commented 8 years ago

Uninstalling, upgrading, and reinstalling jsoncpp --HEAD worked for me, too.

d235j commented 8 years ago

Yeah I need to fix the readme. A dependency won't help since you can't specify it as from head. Sorry about the delay on my end!

rpavlik commented 8 years ago

Looks like the instructions already made it into the readme. Also, I think I stopped using omitEndingLineFeed so that might help you too.

gching commented 8 years ago

EDIT Nevermind, just saw the new commit removing the additional step to install the head of jsoncpp :+1:

@rpavlik sorry for talking here, but if omitEndingLineFeed is not used, does that mean we don't need need to use the head version of jsoncpp? If so, it would be easier to just add jsoncpp as a dependency rather than having to do both.

rpavlik commented 8 years ago

No need to apologize, I'm pretty sure that's what it means but I don't have a Mac to test it on to be sure.

d235j commented 8 years ago

@gching and @rpavlik I tested it and fixed it up — indeed we no longer need jsoncpp from head.