Comments (22)
i have solved it a little by giving the right permission to configure and running it under root but get same errors , just the Warning disapered
checking for wget... wget
checking for unzip... unzip
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
Submodule 'build' () registered for path 'build'
fatal: Needed a single revision
Unable to find current revision in submodule path 'build'
./configure: line 2990: pushd: build/third: No such file or directory
./configure: line 2991: ./setup: No such file or directory
configure: error: Failed to set up the test utilities
from thorsserializer.
Warning: Permanently added the RSA host key for IP address '192.30.252.128' to the list of known hosts.
This is just warning you that it is adding the machine to your know hosts file. It only does this the first time. After that it should not be a problem.
It seems to be failing when pulling the build tools from github:
Permission denied (publickey).
Because I use ssh for all my github communications it is expecting you to have registered your ssh public key with github. You can fix this by adding your public key to git hub as per this:
http://stackoverflow.com/questions/25828483/github-permission-denied-publickey
## Note the use of git@ here. This makes sure you pull it using ssh.
## If this works then the rest of the processes should also work.
git clone [email protected]:Loki-Astari/ThorsSerializer.git
cd ThorsSerializer
./configure --disable-binary
from thorsserializer.
Note: Short Instructions:
Part 1: Generate ssh key
# Generate an ssh key
# If you don't have any keys then just hit enter to the prompts.
> ssh-keygen -t rsa -b 4096
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/Loki/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/Loki/.ssh/id_rsa.
Your public key has been saved in /Users/Loki/.ssh/id_rsa.pub.
The key fingerprint is:
42:cc:de:bf:61:a2:23:ab:ab:fd:27:11:77:da:ba:0c Loki@Asguard
The key's randomart image is:
+--[ RSA 4096]----+
| . . |
|.... . |
|+o.o . |
|+o+ o . . |
|+. + XX |
|.o. . o . x x |
|. .xE.a. a a |
| ..oo |
| .oo. |
+-----------------+
# If you have not set up a ~/.ssh/config file this will be all you need to do.
# You can skip forward to adding your public key to github.
#
# If you already have an ~/.ssh/config file then you probably know what to do!
# But you can add an IdentityFile
> echo >> ~/.ssh/config
> echo "IdentifyFile ~/.ssh/id_rsa" >> ~/.ssh/config
Part 2: Add public key to github
Now you need to add the public part of the key to github.
- Got to the page "https://github.com/settings/ssh"
- Click the button "Add SSH Key" in the top right.
- Add a title the paste the content of the file
~/.ssh/id_rsa.pub
Now it should all work.
from thorsserializer.
thanks but i have solved it for now , i have the errors
checking for wget... wget
checking for unzip... unzip
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
Submodule 'build' () registered for path 'build'
fatal: Needed a single revision
Unable to find current revision in submodule path 'build'
./configure: line 2990: pushd: build/third: No such file or directory
./configure: line 2991: ./setup: No such file or directory
configure: error: Failed to set up the test utilities
from thorsserializer.
Those errors are caused because you did not solve it.
Your git submodule update
failed because you don't have any keys installed on github.com
Once you have added your ssh keys correctly (see above). You can fix by:
git submodule update
./configure --disable-binary
from thorsserializer.
@chfakht I see you have now installed a public key on github. Are you problems solved?
from thorsserializer.
yes it's working now but after that when i run make i get those errors
Buiding src Start
make -C src build PREFIX=/home/pi/yB/ThorsSerializer/build CXXSTDVER=
make[1]: Entering directory '/home/pi/yB/ThorsSerializer/src'
Buiding BinaryRep Start
make -C BinaryRep build PREFIX=/home/pi/yB/ThorsSerializer/build CXXSTDVER=
make[2]: Entering directory '/home/pi/yB/ThorsSerializer/src/BinaryRep'
Building Objects for Testing and Coverage
make[3]: Entering directory '/home/pi/yB/ThorsSerializer/src/BinaryRep'
make[3]: Nothing to be done for 'gcovarch'.
make[3]: Leaving directory '/home/pi/yB/ThorsSerializer/src/BinaryRep'
Building Unit Tests
make[3]: Entering directory '/home/pi/yB/ThorsSerializer/src/BinaryRep/test'
Building coverage
g++ -c unittest.cpp -DCOVERAGE_BinaryRep OK
ERROR
g++ -c BinaryRepTest.cpp -o coverage/BinaryRepTest.o -fPIC -I/home/pi/yB/ThorsSerializer/build/include -isystem /home/pi/yB/ThorsSerializer/build/include3rd -DBOOST_FILESYSTEM_VERSION=3 -I.. -DCOVERAGE_BinaryRep -g -fprofile-arcs -ftest-coverage -DCOVERAGE_TEST -Wno-unreachable-code -DTHOR_USE_CPLUSPLUS
========================================
In file included from ../BinaryRep.h:5:0,
from BinaryRepTest.cpp:3:
../BinaryFormat.h:5:29: fatal error: BinaryRepConfig.h: No such file or directory
compilation terminated.
/home/pi/yB/ThorsSerializer/build/tools/Makefile:514: recipe for target 'coverage/BinaryRepTest.o' failed
make[3]: *** [coverage/BinaryRepTest.o] Error 1
make[3]: *** Waiting for unfinished jobs....
ERROR
g++ -c FltBinRepTest.cpp -o coverage/FltBinRepTest.o -fPIC -I/home/pi/yB/ThorsSerializer/build/include -isystem /home/pi/yB/ThorsSerializer/build/include3rd -DBOOST_FILESYSTEM_VERSION=3 -I.. -DCOVERAGE_BinaryRep -g -fprofile-arcs -ftest-coverage -DCOVERAGE_TEST -Wno-unreachable-code -DTHOR_USE_CPLUSPLUS
========================================
In file included from ../FltBinRep.h:6:0,
from FltBinRepTest.cpp:3:
../BinaryFormat.h:5:29: fatal error: BinaryRepConfig.h: No such file or directory
compilation terminated.
/home/pi/yB/ThorsSerializer/build/tools/Makefile:514: recipe for target 'coverage/FltBinRepTest.o' failed
make[3]: *** [coverage/FltBinRepTest.o] Error 1
ERROR
g++ -c BinaryFormatTest.cpp -o coverage/BinaryFormatTest.o -fPIC -I/home/pi/yB/ThorsSerializer/build/include -isystem /home/pi/yB/ThorsSerializer/build/include3rd -DBOOST_FILESYSTEM_VERSION=3 -I.. -DCOVERAGE_BinaryRep -g -fprofile-arcs -ftest-coverage -DCOVERAGE_TEST -Wno-unreachable-code -DTHOR_USE_CPLUSPLUS
========================================
In file included from BinaryFormatTest.cpp:3:0:
../BinaryFormat.h:5:29: fatal error: BinaryRepConfig.h: No such file or directory
compilation terminated.
ERROR
g++ -c IntBinRepTest.cpp -o coverage/IntBinRepTest.o -fPIC -I/home/pi/yB/ThorsSerializer/build/include -isystem /home/pi/yB/ThorsSerializer/build/include3rd -DBOOST_FILESYSTEM_VERSION=3 -I.. -DCOVERAGE_BinaryRep -g -fprofile-arcs -ftest-coverage -DCOVERAGE_TEST -Wno-unreachable-code -DTHOR_USE_CPLUSPLUS
/home/pi/yB/ThorsSerializer/build/tools/Makefile:514: recipe for target 'coverage/BinaryFormatTest.o' failed
========================================
make[3]: *** [coverage/BinaryFormatTest.o] Error 1
In file included from ../IntBinRep.h:5:0,
from IntBinRepTest.cpp:3:
../BinaryFormat.h:5:29: fatal error: BinaryRepConfig.h: No such file or directory
compilation terminated.
/home/pi/yB/ThorsSerializer/build/tools/Makefile:514: recipe for target 'coverage/IntBinRepTest.o' failed
make[3]: *** [coverage/IntBinRepTest.o] Error 1
rm coverage/unittest.o
make[3]: Leaving directory '/home/pi/yB/ThorsSerializer/src/BinaryRep/test'
/home/pi/yB/ThorsSerializer/build/tools/Makefile:320: recipe for target 'test' failed
make[2]: *** [test] Error 2
make[2]: Leaving directory '/home/pi/yB/ThorsSerializer/src/BinaryRep'
/home/pi/yB/ThorsSerializer/build/tools/Project.Makefile:30: recipe for target 'BinaryRep.dir' failed
make[1]: *** [BinaryRep.dir] Error 2
make[1]: Leaving directory '/home/pi/yB/ThorsSerializer/src'
/home/pi/yB/ThorsSerializer/build/tools/Project.Makefile:30: recipe for target 'src.dir' failed
make: *** [src.dir] Error 2
from thorsserializer.
The error:
../BinaryFormat.h:5:29: fatal error: BinaryRepConfig.h: No such file or directory
The file BinaryFormat.h
should be in the directory src/BinaryRep/BinaryRepConfig.h
and is generated from the file src/BinaryRep/BinaryRepConfig.h.in
by the configuration scripts. If this file does not exist then it suggests that ./configuration
has not run correctly.
Please re-run the configuration script. It does a lot more than download the build tools. It also sets up the tests tools and checks the configuration.
from thorsserializer.
@chfakht I am sorry for all the problems.
From this experience I have updated my build tools to provide more detailed instructions when this happens to the next person. I hope we can solve your next issue as well.
from thorsserializer.
you have done a great job 💯 hope that the issue will be solved in the next release ....
oh i forget to tell you that i'm using GCC 4.6 that came by default in raspbian installed on my pi ... however in your requirement you said that i must have a compiler compatible with c++14 version !!! => it could be this the problem
from thorsserializer.
Yep that is definitely a problem:
The configuration scripts will fail (and refuse to complete) unless your compiler can support C++14 (so that sounds like the problem).
According to this page:
https://gcc.gnu.org/projects/cxx0x.html
gcc 4.6 only supports the C++ 11 as a pre-release
According to this page:
https://gcc.gnu.org/projects/cxx1y.html
gcc 4.8 supports the C++ 14 (but best to upgrade to gcc 4.9 as a minimum).
from thorsserializer.
now that i have installed g++4.9 like an option in raspberry from this link :https://solarianprogrammer.com/2015/01/13/raspberry-pi-raspbian-install-gcc-compile-cpp-14-programs/ , now i can compile an example by g++-4.9 -std=c++14 -Wall -pedantic test.cpp -o lambda_test
so how can add the flag g++-4.9 to use it with configure for example
from thorsserializer.
On Ubuntu you can specify which version is the default compiler with update-alternatives
.
see: how-to-change-the-default-gcc-compiler-in-ubuntu for details.
Note: The makefile will also want to run code coverage tests on the code you will probably need to install the gcov-4.9
tool as well.
If you are using a system where it is hard to change the default you can tell configure to use an alternative.
CXX=g++-4.9 COV=gcov-4.9 ./configure --disable-binary
from thorsserializer.
No when running CXX=g++-4.9 COV=gcov-4.9 ./configure --disable-binary
i get this
checking for wget... wget
checking for unzip... unzip
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++-4.9 accepts -g... yes
Submodule 'build' () registered for path 'build'
~/yB/ThorsSerializer/build/third ~/yB/ThorsSerializer
~/yB/ThorsSerializer
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++-4.9 accepts -g... (cached) yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for flex... no
checking for lex... no
configure: error:
Error: This package uses flex (and is not compatible with lex).
Please make sure flex is installed.
when trying to install bison & flex by
sudo apt-get install bison flex
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package bison is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
bison-doc
Package flex is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'bison' has no installation candidate
E: Package 'flex' has no installation candidate
from thorsserializer.
You can download and build bison/flex from source
http://stackoverflow.com/q/7320370/14065
from thorsserializer.
thanks i installed flex bison and yaml ang run the command successfull but when running make i get those errors
make
Buiding src Start
make -C src build PREFIX=/home/pi/yB/ThorsSerializer/build CXXSTDVER=14
make[1]: Entering directory '/home/pi/yB/ThorsSerializer/src'
Buiding BinaryRep Start
make -C BinaryRep build PREFIX=/home/pi/yB/ThorsSerializer/build CXXSTDVER=14
make[2]: Entering directory '/home/pi/yB/ThorsSerializer/src/BinaryRep'
Building Objects for Testing and Coverage
make[3]: Entering directory '/home/pi/yB/ThorsSerializer/src/BinaryRep'
make[3]: Nothing to be done for 'gcovarch'.
make[3]: Leaving directory '/home/pi/yB/ThorsSerializer/src/BinaryRep'
Building Unit Tests
make[3]: Entering directory '/home/pi/yB/ThorsSerializer/src/BinaryRep/test'
Building coverage
g++-4.9 -c unittest.cpp -DCOVERAGE_BinaryRep OK
g++-4.9 -c BinaryRepTest.cpp -DCOVERAGE_BinaryRep OK
g++-4.9 -c BinaryFormatTest.cpp -DCOVERAGE_BinaryRep OK
g++-4.9 -c IntBinRepTest.cpp -DCOVERAGE_BinaryRep OK
g++-4.9 -c FltBinRepTest.cpp -DCOVERAGE_BinaryRep OK
g++-4.9 -o coverage/unittest.app -DCOVERAGE_BinaryRep ERROR
g++-4.9 -o coverage/unittest.app coverage/FltBinRepTest.o coverage/BinaryRepTest.o coverage/IntBinRepTest.o coverage/BinaryFormatTest.o coverage/unittest.o -L../coverage -L/home/pi/yB/ThorsSerializer/build/lib -lgtest -fprofile-arcs -ftest-coverage -lpthread -L/home/pi/yB/ThorsSerializer/build/lib
===================================================
coverage/FltBinRepTest.o: In function `FltBinRepTest_convertIEEELongDoubleNan_Test::TestBody()':
/home/pi/yB/ThorsSerializer/src/BinaryRep/test/FltBinRepTest.cpp:42: undefined reference to `ThorsAnvil::BinaryRep::FloatConverterTrait<long double>::StorageType ThorsAnvil::BinaryRep::host2NetIEEE<long double, true, 8u, 53u>(long double)'
coverage/FltBinRepTest.o: In function `FltBinRepTest_convertIEEELongDouble1Million234p875_Test::TestBody()':
/home/pi/yB/ThorsSerializer/src/BinaryRep/test/FltBinRepTest.cpp:90: undefined reference to `ThorsAnvil::BinaryRep::FloatConverterTrait<long double>::StorageType ThorsAnvil::BinaryRep::host2NetIEEE<long double, true, 8u, 53u>(long double)'
coverage/FltBinRepTest.o: In function `FltBinRepTest_revertIEEELongDoubleNan_Test::TestBody()':
/home/pi/yB/ThorsSerializer/src/BinaryRep/test/FltBinRepTest.cpp:106: undefined reference to `ThorsAnvil::BinaryRep::FloatConverterTrait<long double>::StorageType ThorsAnvil::BinaryRep::host2NetIEEE<long double, true, 8u, 53u>(long double)'
/home/pi/yB/ThorsSerializer/src/BinaryRep/test/FltBinRepTest.cpp:106: undefined reference to `long double ThorsAnvil::BinaryRep::net2HostIEEE<long double, true, 8u, 53u>(ThorsAnvil::BinaryRep::FloatConverterTrait<long double>::StorageType)'
coverage/FltBinRepTest.o: In function `FltBinRepTest_revertIEEELongDouble1Million234p875_Test::TestBody()':
/home/pi/yB/ThorsSerializer/src/BinaryRep/test/FltBinRepTest.cpp:121: undefined reference to `ThorsAnvil::BinaryRep::FloatConverterTrait<long double>::StorageType ThorsAnvil::BinaryRep::host2NetIEEE<long double, true, 8u, 53u>(long double)'
/home/pi/yB/ThorsSerializer/src/BinaryRep/test/FltBinRepTest.cpp:121: undefined reference to `long double ThorsAnvil::BinaryRep::net2HostIEEE<long double, true, 8u, 53u>(ThorsAnvil::BinaryRep::FloatConverterTrait<long double>::StorageType)'
collect2: error: ld returned 1 exit status
/home/pi/yB/ThorsSerializer/build/tools/Makefile:463: recipe for target 'coverage/unittest.app' failed
make[3]: *** [coverage/unittest.app] Error 1
rm coverage/unittest.o
make[3]: Leaving directory '/home/pi/yB/ThorsSerializer/src/BinaryRep/test'
/home/pi/yB/ThorsSerializer/build/tools/Makefile:320: recipe for target 'test' failed
make[2]: *** [test] Error 2
make[2]: Leaving directory '/home/pi/yB/ThorsSerializer/src/BinaryRep'
/home/pi/yB/ThorsSerializer/build/tools/Project.Makefile:30: recipe for target 'BinaryRep.dir' failed
make[1]: *** [BinaryRep.dir] Error 2
make[1]: Leaving directory '/home/pi/yB/ThorsSerializer/src'
/home/pi/yB/ThorsSerializer/build/tools/Project.Makefile:30: recipe for target 'src.dir' failed
make: *** [src.dir] Error 2
what's next :package:␣
from thorsserializer.
I have updated the build tools to handle this correctly now.
If you pass the --disable-binary flag to configure it will not build the BinaryRep directory. Which is probably a good move as it is probably not trivialy portable to other hardware.
git pull
./configure --disable-binary
make
from thorsserializer.
Now finally i was able to run ./configure make and sudo make install successfully 👍
but when trying the simple example in doc folder
g++-4.9 -std=c++14 example1.cpp -lThorSerialize14
(it's compiled successfully) but when running the executable i get
./a.out: error while loading shared libraries: libThorSerialize14.so: cannot open shared object file: No such file or directory
some final help plzz
from thorsserializer.
When the system tries to load shared libraries at runtime it has to know where to look. By default this is just in /usr/lib
but the system allows you to extend the default by having the file /etc/ld.so.conf
. On most version of Linux this will add the directory /usr/local/lib
(which is where user defined software is installed).
I suspect the raspberry-pi is not a standard desktop configuration where user code is normally installed.
For full details:
http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
So you have two options if you want all user built libs to work.
- Modify
/etc/ld.so.conf
to add/usr/local/lib
- Build so that the shared lib is installed in
/usr/lib
./configure --disable-binary prefix=/usr
sudo make instal
Optionally you can use the environment variables to modify the search path temporarily.
# Notice there is just a space between the two commands.
# This works in bash and only modifies the environment for this one command.
LD_LIBRARY_PATH=/usr/local/lib ./a.out
# if you want to extend it permanently (for the current shell)
export LD_LIBRARY_PATH=/usr/local/lib
./a.out
from thorsserializer.
thanks a lot , i have modify /etc/ld.so.conf to add /usr/local/lib and runned ldconfig after that , now i am able to run the example successfullty
thanks for putting in your time and effort to solve this issue 💯 , i have also learn a lot of things from this 👍 after that i want to use JSON format to save some data into database .... i've choosen mongoDB database , have you any idea on how to use it in C++ , or maybe suggest me another database 🔢
thanks
from thorsserializer.
Sorry. I have not used Mongo. Good luck.
I have used MySQL and there are C++ libraries available for that.
from thorsserializer.
yes i have found "jsoncpp" in github that support MySQL , but however i
don't know if MySQL is suitable in my case since i just want to stock some
data on it without need the to update it ...
ᐧ
2015-08-16 22:00 GMT+01:00 Loki Astari [email protected]:
Sorry. I have not used Mongo. Good luck.
I have used MySQL and there are C++ libraries available for that.
—
Reply to this email directly or view it on GitHub
#13 (comment)
.
from thorsserializer.
Related Issues (20)
- Maximum number of levels/depth? HOT 5
- No compile enum with 8 and more element HOT 6
- Deserializing to existing object with vectors/pointers? HOT 8
- Std:array not working on header only version HOT 6
- Make under Homebrew results in template error HOT 1
- Make Trait does not work for types with static members with non-standard types HOT 1
- Compilation issue with VisualStudio 2019 on Windows HOT 4
- my compile problem of example1 HOT 1
- Redefine traits at runtime HOT 6
- MakeTrait: error: unable to deduce 'std::initializer_list<auto>' HOT 9
- [Linuxbrew] Trying to prepare v2.2.0 bottle but hitting compilation issues (tried GCC-11 and LLVM) HOT 10
- Tags with header only HOT 7
- Linker error on basic example, I am missing something? HOT 4
- Linker Error? HOT 5
- Invalid enum values causes undefined behavior HOT 1
- missing include file magic_enum.hpp HOT 3
- Linker fails with header-only build HOT 11
- Why there is no CMAKE support? HOT 5
- error compiling with std::shared_ptr<const Type> HOT 5
- read problem with map of pointers HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thorsserializer.