Coder Social home page Coder Social logo

Comments (23)

jhs507 avatar jhs507 commented on August 28, 2024

Sorry, about this Kevin. Just to confirm you get this error when using the makefile in the release1.1 folder after checking out the master branch?

Have you run "make clean" before attempting to make?

from crhmcode.

KevinShook avatar KevinShook commented on August 28, 2024

Yep.I am on the master branch, in the release1.1 folder
~/data/projects/crhmcode/release1.1 $ git show-branch [master] Alteration to ClassWQ_Netrout.cpp based on version of water modules recived from Diogo.
I ran make clean first, before running make.
I've attached a complete listing of the make output.
crhmcodemake.txt

from crhmcode.

jhs507 avatar jhs507 commented on August 28, 2024

I was previously using gcc 7.5 but I just checked with version 9.3.0 on Ubuntu and it compiled for me.

Based on the error message you receive it looks like one of your c++ std lib files was possibly compiled with a older version of gcc. Can you recompile your std lib c++ files and try to make again?

from crhmcode.

KevinShook avatar KevinShook commented on August 28, 2024

I do have the version 9 c++ std lib files installed:
image

However, version 6 is also installed. Is make not finding the correct version?

K

from crhmcode.

jhs507 avatar jhs507 commented on August 28, 2024

I doubt that is the case but if you add these two lines into the makefile for the crhm target then we can verify it for sure.
gcc --version g++ --version

crhm: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS) $(DFLAGS) $(LIBS)
gcc --version
g++ --version

from crhmcode.

jhs507 avatar jhs507 commented on August 28, 2024

Actually this seems to be an instance of this known error. https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html

It is leading me to believe that it is your version of the boost library that was compiled with and older version of gcc.

if you recompile boost with a newer gcc or download a new version it should hopefully fix this issue.

from crhmcode.

KevinShook avatar KevinShook commented on August 28, 2024

Ah, that makes sense.
Thanks, I'll try a newer version.
BTW, I but the commands in the makefile but got the error message
Makefile:96: *** missing separator. Stop.

Where line 96 is
gcc --version

I'll update my version of boost and will try again.

K

from crhmcode.

jhs507 avatar jhs507 commented on August 28, 2024

Those lines will need to be indented to be part of the crhm target sorry my formatting here was ambiguous.

from crhmcode.

KevinShook avatar KevinShook commented on August 28, 2024

Sorry - responded to the wrong message

I re-downloaded boost 1.73 and get the same error.

/usr/include/c++/9/ext/string_conversions.h:105: undefined reference to `___chkstk_ms'
collect2: error: ld returned 1 exit status

Did make clean first
I tabbed in the two lines

crhm: $(OBJ)
    $(CC) -o $@ $^ $(CFLAGS) $(DFLAGS) $(LIBS)
    gcc --version
    g++ --version

and get the same error:

$ make clean  
Makefile:96: *** missing separator.  Stop.

I also upgraded to boost 1.75 and still get the same error

from crhmcode.

jhs507 avatar jhs507 commented on August 28, 2024

Interesting I thought for sure that was it. Where did you get your boost library from?

from crhmcode.

KevinShook avatar KevinShook commented on August 28, 2024

Downloaded it directly from https://www.boost.org/

from crhmcode.

jhs507 avatar jhs507 commented on August 28, 2024

I will try with boost 1.75 and see if I can recreate your error.

from crhmcode.

jhs507 avatar jhs507 commented on August 28, 2024

I am able to compile with gcc 9.3.0 and boost 1.75.0.

The missing separator error that make is producing is most likely caused by using 4 spaces as a tab instead of a tab character. Unfortunately make requires actual tab chars not just spaces.

from crhmcode.

KevinShook avatar KevinShook commented on August 28, 2024

You were right. I forgot that my editor was set up to convert tabs to spaces.
Thanks.
I still get the same error message.
I've attached the output.
crhmcodemake.txt

I was wondering since it says the problem is:
/usr/include/c++/9/ext/string_conversions.h:105: undefined reference to ___chkstk_ms'`
if we should check to see if we have the same version of string_conversions.h?

from crhmcode.

KevinShook avatar KevinShook commented on August 28, 2024

I tried googling the error, and most of the results indicate that chkstk_ms is for Windows - is that right?

from crhmcode.

jhs507 avatar jhs507 commented on August 28, 2024

check to see if we have the same version of string_conversions.h

Sure can you locate the file on your system and upload it here.

However since it is a library file they may differ due to system architecture ect...

I tried googling the error, and most of the results indicate that chkstk_ms is for Windows - is that right?

It seems to be related to the MinGW compiler which neither of us are using so I do find that confusing.

from crhmcode.

KevinShook avatar KevinShook commented on August 28, 2024

Here's my string_conversions.h
string_conversions.h.zip

The error refers to line 105
/usr/include/c++/9/ext/string_conversions.h:105: undefined reference to ___chkstk_ms'`

In my file, line 105 is

_CharT* __s = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __n));

from crhmcode.

KevinShook avatar KevinShook commented on August 28, 2024

Are we sure that we are both using the same version of Makefile?
Here's mine
Makefile.zip

from crhmcode.

jhs507 avatar jhs507 commented on August 28, 2024

Our string_conversions.h and makefile are identical.

I have compiled with boost 1.73.0, 1.74.0, and 1.75.0 and gcc 9.3.0 without error.

from crhmcode.

jhs507 avatar jhs507 commented on August 28, 2024

Peter had an issue with the -mstack-arg-probe flag earlier.

We actually shouldn't need any of the flags in the DFLAGS statement I just haven't gotten around to updating the makefile. Can you try leaving the DFLAGS statement empty?

from crhmcode.

KevinShook avatar KevinShook commented on August 28, 2024

I'll give it a try

from crhmcode.

KevinShook avatar KevinShook commented on August 28, 2024

I commented out the DFLAGS and it now compiles without any errors.]
I will now test the program with one of our newer models.
Thanks for the help.

from crhmcode.

jhs507 avatar jhs507 commented on August 28, 2024

Awesome I will commit a new version of the makefile without so many DFLAGS that can cause issues.

from crhmcode.

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.