Giter Site home page Giter Site logo

Build fails on macos about jsbsim HOT 8 CLOSED

jsbsim-team avatar jsbsim-team commented on August 17, 2024
Build fails on macos

from jsbsim.

Comments (8)

agodemar avatar agodemar commented on August 17, 2024

Hi Ewald, thank you for bringing out this issue.

At the moment I do not have a MacOS available. Let's see if someone can shed some light on the compilation errors.

What I know is that since 10.9 one has to replace libstd++ with libc++

from jsbsim.

WillemEerland avatar WillemEerland commented on August 17, 2024

Right you are!

I don't have a fix -- I'm going to leave that to the coding guru's. I did find the following article, which may be useful to that particular guru:

https://philbull.wordpress.com/2012/07/27/portability-issues-with-floating-point-exception-handling/
https://philbull.wordpress.com/2012/12/09/update-floating-point-exception-handling-on-mac-os-x/

What I do have, is a workaround, which you can find here:

https://github.com/WillemEerland/jsbsim/tree/macos-fix

It comments out two lines, and switched around a declaration of Aeromatic++ (Why does the compiler on MacOS complain, and not on Linux?)

It compiles on MacOS, and completes almost all tests, except "TestInputSocket".

97% tests passed, 1 tests failed out of 34

Total Test time (real) = 158.06 sec

The following tests FAILED:
10 - TestInputSocket (Failed)
Errors while running CTest

I believe it will only influence the Python library and only the input socket exception handling... so depending on what you're planning, this may work for you!

from jsbsim.

ezietsman avatar ezietsman commented on August 17, 2024

OK!

Aeromatic seems to not build using clang but it does with GCC. Here's what I did:

export CXX=g++-8
export CC=gcc-8
cmake ..
make -j 4

and this worked fine after I commented out those two lines in fpectmodule.cpp

from jsbsim.

bcoconni avatar bcoconni commented on August 17, 2024

@ezietsman and @WillemEerland the fpectl Python module is only used to make sure that none of the tests raise a floating point exception. JSBSim does not need it for a day to day usage. Even the tests can be run without fpectl, it is just that if a floating point exception is raised, it will be ignored and the test will continue.

I will investigate later how the fpectl code can be modified to run on MacOS X as well.

Regarding TestInputSocket it fails from time to time. This is most likely due to a race condition in it, you can run it again using the following command

> ctest -R TestInputSocket

If the failure was due to the race condition then it should succeed after a couple of try. If it does not, then you can get more information about the test failure with the -V (verbose) flag.

> ctest -R TestInputSocket -V

from jsbsim.

WillemEerland avatar WillemEerland commented on August 17, 2024

I tried it five times, failed five times. Here's (part of) the more detailed report

10: End of vehicle configuration loading.
10: -------------------------------------------------------------------------------
10: ok
10:
10: ======================================================================
10: FAIL: test_no_input (main.TestInputSocket)
10: ----------------------------------------------------------------------
10: Traceback (most recent call last):
10: File "TestInputSocket.py", line 156, in test_no_input
10: TelnetInterface(fdm, 5., 1137)
10: AssertionError: error not raised
10:
10: ----------------------------------------------------------------------
10: Ran 3 tests in 2.856s
10:
10: FAILED (failures=1)
1/1 Test #10: TestInputSocket ..................***Failed 3.33 sec

from jsbsim.

ezietsman avatar ezietsman commented on August 17, 2024

OK so it seems fpectl isn't in python 3, which for various reasons, I need to use at the moment. I'm trying to integrate jsbsim into a game engine, so all I really want to do is to pass in (throttle, rudder, roll, pitch, delta_time) inputs and want back (X, Y, Z, roll, pitch, yaw, Vx, Vy, Vz) for each time step.

I'm happy to hack at JSBSim to allow it to build python 3 bindings but I may need some guidance.

from jsbsim.

bcoconni avatar bcoconni commented on August 17, 2024

@WillemEerland OK thanks for the report. It seems that TestInputSocket fails for a reason different from a race condition on your system. Could you open a separate issue to address this topic ?

And in the meantime could you please check that the following lines of Python code raise a socket.error exception on your platform as well ?

import telnetlib
telnetlib.Telnet("localhost", 1137, 2.0)

from jsbsim.

bcoconni avatar bcoconni commented on August 17, 2024

@ezietsman and @WillemEerland the PR #23 has been merged. I think this issue can now be closed ?

from jsbsim.

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.