Menu

#245 gpsim 0.31.0 build fails on macOS due to missing header "error.h"

open
nobody
None
5
2019-10-18
2019-08-06
Caleb Xu
No

In gpsim 0.31.0, the file src/modules.cc includes the header error.h, which does not exist in the source tree, thus resulting in compilation failure about the header not being found. Upon removing the include statement, the program built successfully. I am not sure if that was the right thing to do (if that introduced any defects), but everything seems to work as far as I could tell.

I also sent an email to the gpsim-devel mailing list about this, but opening it here as well.

Discussion

  • Anonymous

    Anonymous - 2019-10-12

    This seems to be a typo in the source.
    Changing modules.cc line 50 -> #include "errors.h"
    fixed this error for me. (patch attached).
    But there is more amiss, so this error will go away and be replaced by the next :(

     
  • Roy Rankin

    Roy Rankin - 2019-10-17

    Anonymous,
    Note that this is not a typo. error.h is supplied by glibc-headers in Fedora F30.
    Errolv did make the change you suggested to the svn on 2019-08-15, however, I do not think this is the correct thing to do. For me removing the include of error.h compiles and runs fine and looks like a better change.

    I am concerned by the statement "But there is more amiss, so this error will go away and be replaced by the next :(". I am not into MacOS, but I understand as of Mac OS X 10.14 the system include files have been moved. I suggest running autogen.sh and see if this resolves your issues.

    Please let me know if this works.

    Roy Rankin

     
    • Caleb Xu

      Caleb Xu - 2019-10-17

      The source package does not seem to contain an "autogen.sh", so I tried running "autoreconf -ivf". However, configuring and running make after autoreconf still yields the error regarding error.h.

      So it seems that the autogen/autoreconf does not fix things here.

       
    • Arie Bikker

      Arie Bikker - 2019-10-18

      Thank you, that explains a lot.
      One needs glibc --- or not, because things in error.h are not referenced, removing the include does not break it.

      BTW "the next errors" are not MacOS specific (I'm on FreeBSD), therefore I didn't explain them.
      Anyhow, I have them solved through

      CFLAGS=`pkg-config --cflags gtk+-2.0`; LDFLAGS=`pkg-config --libs gtk+-2.0`; ./configure ; gmake
      
       
  • Roy Rankin

    Roy Rankin - 2019-10-17

    Caleb,

    As it looks like error.h is not really required, does it compile OK without it?
    You made references to other issues. Can you give more details

    Roy

     
    • Caleb Xu

      Caleb Xu - 2019-10-18

      The program compiles just fine without error.h (I just commented out the include line and compilation proceeded without any issues). I haven't really tested the produced binary apart from a simple "gpsim --version", so I can't confirm that all the functionality is intact.

      In terms of other issues, you mentioned that running autogen.sh might resolve the issues that Anonymous was having. I was just writing to let you know that autogen.sh doesn't exist in the source package, so I tried running "autoreconf -ivf" instead, and the configure file that this produced still did not fix the error.h issue that I mentioned above.

      Regarding other issues that Anonymous is having, I don't know what they're facing; for me, I saw no additional compilation issues after commenting out the spurious include line.

       

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB