Code Monkey home page Code Monkey logo

Comments (16)

jcoupey avatar jcoupey commented on June 12, 2024

Can you spot in the compilation trace the file/line in the code base that is responsible for the call?

from vroom.

namtrac avatar namtrac commented on June 12, 2024

Hi,
Apparently, it is the first line of the compilation trace :
utils/../../include/rapidjson/document.h:1038:29:
GenericValue v(value);

Best regards,
Julien Boulay

from vroom.

jcoupey avatar jcoupey commented on June 12, 2024

Two questions:

  • I expect you get the same error when compiling from master or develop?
  • what version of gcc are you using?

Seems like rapidjson is unhappy with an unsigned long parameter for AddMember. I guess this happens when the computing times are logged (https://github.com/jcoupey/vroom/blob/master/src/utils/logger.cpp#L41-L49).

As I can't reproduce this issue on my machine, please try to replace unsigned long with unsigned in https://github.com/jcoupey/vroom/blob/master/src/structures/typedefs.h#L26-L29. Let me know if you are able to compile then.

from vroom.

namtrac avatar namtrac commented on June 12, 2024

I'm facing exactly the same error in develop mode and in master
switching unsigned long to unsigned doesn't change anything

i'm using g++ -std=c++14

here the error i still face ( quit thiner than the first one)
//
//
utils/logger.cpp:48:74: required from here
utils/../../include/rapidjson/document.h:1038:29: error: call of overloaded 'GenericValue(long unsigned int&)' is ambiguous
GenericValue v(value);
^
utils/../../include/rapidjson/document.h:536:14: note: candidate: rapidjson::GenericValue<Encoding, Allocator>::GenericValue(double) [with Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator<>]
explicit GenericValue(double d) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberDoubleFlag) { data_.n.d = d; }
^
utils/../../include/rapidjson/document.h:525:14: note: candidate: rapidjson::GenericValue<Encoding, Allocator>::GenericValue(uint64_t) [with Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator<>; uint64_t = long long unsigned int]
explicit GenericValue(uint64_t u64) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberUint64Flag) {
^
utils/../../include/rapidjson/document.h:511:14: note: candidate: rapidjson::GenericValue<Encoding, Allocator>::GenericValue(int64_t) [with Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator<>; int64_t = long long int]
explicit GenericValue(int64_t i64) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberInt64Flag) {
^
utils/../../include/rapidjson/document.h:504:14: note: candidate: rapidjson::GenericValue<Encoding, Allocator>::GenericValue(unsigned int) [with Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator<>]
explicit GenericValue(unsigned u) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberUintFlag) {
^
utils/../../include/rapidjson/document.h:497:14: note: candidate: rapidjson::GenericValue<Encoding, Allocator>::GenericValue(int) [with Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator<>]
explicit GenericValue(int i) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberIntFlag) {
^
utils/../../include/rapidjson/document.h:447:5: note: candidate: rapidjson::GenericValue<Encoding, Allocator>::GenericValue(const rapidjson::GenericValue<Encoding, Allocator>&) [with Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator<>]
GenericValue(const GenericValue& rhs);
^
utils/../../include/rapidjson/document.h:440:5: note: candidate: rapidjson::GenericValue<Encoding, Allocator>::GenericValue(rapidjson::GenericValue<Encoding, Allocator>&&) [with Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator<>]
GenericValue(GenericValue&& rhs) RAPIDJSON_NOEXCEPT : data_(rhs.data_), flags_(rhs.flags_) {
//
//

thanks you very much
Best regards
Julien Boulay

Julien BOULAY

+33 4 78 48 23 17

----- Mail original -----

De: "Julien Coupey" [email protected]
À: "jcoupey/vroom" [email protected]
Cc: "namtrac" [email protected]
Envoyé: Mercredi 23 Mars 2016 12:29:49
Objet: Re: [vroom] error rapidjson (#31)

Two questions:

* I expect you get the same error when compiling from master or develop ? 
* what version of gcc are you using? 

Seems like rapidjson is unhappy with an unsigned long parameter for AddMember . I guess this happens when the computing times are logged ( https://github.com/jcoupey/vroom/blob/master/src/utils/logger.cpp#L41-L49 ).

As I can't reproduce this issue on my machine, please try to replace unsigned long with unsigned in https://github.com/jcoupey/vroom/blob/master/src/structures/typedefs.h#L26-L29 . Let me know if you are able to compile then.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

from vroom.

jcoupey avatar jcoupey commented on June 12, 2024

The utils/logger.cpp:48 file/line given in the compiler error points to a remaining unsigned long. What if you switch this one to unsigned too at https://github.com/jcoupey/vroom/blob/master/src/utils/logger.cpp#L22?

i'm using g++ -std=c++14

I meant the compiler version, given in the output of g++ -v. I'd like to know because I can't see why I'm not having the same error, apart from different compilers/versions having different representations for some types.

from vroom.

namtrac avatar namtrac commented on June 12, 2024

my compiler version is gcc version 5.3.1 20160307 (Debian 5.3.1-11)

i deleted the "long " and now, different error in vroom-develop

//
//
g++ -std=c++14 -Wpedantic -Wall -O3 -DBOOST_LOG_DYN_LINK -c utils/logger.cpp -o utils/logger.o
g++ -std=c++14 -Wpedantic -Wall -O3 -DBOOST_LOG_DYN_LINK -o ../bin/vroom main.o heuristics/christo_heuristic.o heuristics/heuristic.o heuristics/local_search.o heuristics/mst_heuristic.o heuristics/tsp_strategy.o structures/tsp.o utils/exceptions.o utils/logger.o -lboost_system -lboost_regex -lboost_log -lboost_log_setup -lpthread -lboost_thread
/usr/bin/ld: cannot open output file ../bin/vroom: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [../bin/vroom] Error 1

//
//

but same error in vroom-master
//
//
utils/../../include/rapidjson/document.h:1038:29: error: call of overloaded 'GenericValue(long unsigned int&)' is ambiguous
GenericValue v(value);
^
utils/../../include/rapidjson/document.h:536:14: note: candidate: rapidjson::GenericValue<Encoding, Allocator>::GenericValue(double) [with Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator<>]
...
...
...
utils/../../include/rapidjson/document.h:440:5: note: candidate: rapidjson::GenericValue<Encoding, Allocator>::GenericValue(rapidjson::GenericValue<Encoding, Allocator>&&) [with Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator<>]
GenericValue(GenericValue&& rhs) RAPIDJSON_NOEXCEPT : data_(rhs.data_), flags_(rhs.flags_) {
//
//

Thank you

Julien BOULAY

+33 4 78 48 23 17

----- Mail original -----

De: "Julien Boulay" [email protected]
À: [email protected]
Envoyé: Mercredi 23 Mars 2016 15:56:32
Objet: Fwd: [vroom] error rapidjson (#31)

Julien BOULAY

+33 4 78 48 23 17

----- Mail original -----

De: "Julien Coupey" [email protected]
À: "jcoupey/vroom" [email protected]
Cc: "namtrac" [email protected]
Envoyé: Mercredi 23 Mars 2016 15:52:35
Objet: Re: [vroom] error rapidjson (#31)

The utils/logger.cpp:48 file/line given in the compiler error points to a remaining unsigned long . What if you switch this one to unsigned too at https://github.com/jcoupey/vroom/blob/master/src/utils/logger.cpp#L22 ?

i'm using g++ -std=c++14

I meant the compiler version, given in the output of g++ -v . I'd like to know because I can't see why I'm not having the same error, apart from different compilers/versions having different representations for some types.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

from vroom.

jcoupey avatar jcoupey commented on June 12, 2024

/usr/bin/ld: cannot open output file ../bin/vroom: No such file or directory

Did you create the bin folder as described in https://github.com/jcoupey/vroom/wiki/Building?

but same error in vroom-master

From the error being the same as before (about long unsigned), I suspect your last modification only affected the code from the develop branch. You might need to apply the same modification after checking out the master branch.

from vroom.

namtrac avatar namtrac commented on June 12, 2024

i didn't created the bin folder
but i applyed the same modification before trying the "make " on master branche

thank you

Julien BOULAY

+33 4 78 48 23 17

----- Mail original -----

De: "Julien Coupey" [email protected]
À: "jcoupey/vroom" [email protected]
Cc: "namtrac" [email protected]
Envoyé: Mercredi 23 Mars 2016 17:10:53
Objet: Re: [vroom] error rapidjson (#31)

Did you create the bin folder as described in https://github.com/jcoupey/vroom/wiki/Building ?

From the error being the same as before (about long unsigned ), I suspect your last modification only affected the code from the develop branch. You might need to apply the same modification after checking out the master branch.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

from vroom.

jcoupey avatar jcoupey commented on June 12, 2024

Nothing has changed on develop since the last merge to master so you'll currently get the same behaviour whatever the branch you manage to build the executable from.

Can you build successfully now with an existing bin folder?

from vroom.

namtrac avatar namtrac commented on June 12, 2024

hi,
Yes i can build successfully now, had a prob of library with boost but it's solved.
Thanks you very much for help
Julien Boulay

Julien BOULAY

+33 4 78 48 23 17

----- Mail original -----

De: "Julien Coupey" [email protected]
À: "jcoupey/vroom" [email protected]
Cc: "namtrac" [email protected]
Envoyé: Mercredi 23 Mars 2016 18:16:10
Objet: Re: [vroom] error rapidjson (#31)

Nothing has changed on develop since the last merge to master so you'll currently get the same behaviour whatever the branch you manage to build the executable from.

Can you build successfully now with an existing bin folder?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

from vroom.

jcoupey avatar jcoupey commented on June 12, 2024

Nice. I'm glad it worked for you in the end!

from vroom.

jcoupey avatar jcoupey commented on June 12, 2024

@namtrac I hope the commit referenced above solves the issue you encountered. Could you update your develop branch to this commit to check if you are able to compile without any modification to the code?

from vroom.

namtrac avatar namtrac commented on June 12, 2024

it does solved the issues i encountered,
i tryed ton compile without any modifications but it did not worked with unsigned long , i'm working on running it actually
thanks for your help
Julien Boulay

Julien BOULAY

+33 4 78 48 23 17

----- Mail original -----

De: "Julien Coupey" [email protected]
À: "jcoupey/vroom" [email protected]
Cc: "namtrac" [email protected]
Envoyé: Jeudi 24 Mars 2016 13:45:38
Objet: Re: [vroom] error rapidjson (#31)

@namtrac I hope the commit referenced above solves the issue you encountered. Could you update your develop branch to this commit to check if you are able to compile without any modification to the code?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

from vroom.

jcoupey avatar jcoupey commented on June 12, 2024

I mean without any modification but after checking out at 60881f6 (last commit currently on develop branch, added today). No more unsigned long then, I wonder if you are able to get this version to compile without modification?

from vroom.

namtrac avatar namtrac commented on June 12, 2024

Hi
I'm able to compile without any modification with the last commit with the duration_t ints
thanks again for the help
best regards
Julien Boulay

Julien BOULAY

+33 4 78 48 23 17

----- Mail original -----

De: "Julien Coupey" [email protected]
À: "jcoupey/vroom" [email protected]
Cc: "namtrac" [email protected]
Envoyé: Jeudi 24 Mars 2016 18:54:59
Objet: Re: [vroom] error rapidjson (#31)

I mean without any modification but after checking out at 60881f6 (last commit currently on develop branch, added today). No more unsigned long then, I wonder if you are able to get this version to compile without modification?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

from vroom.

jcoupey avatar jcoupey commented on June 12, 2024

Good, thanks for reporting!

from vroom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.