I can't build jsbsim python3.8.5 ubuntu18.04 on vmware #347
Replies: 8 comments
-
Hi @kkz003 , According to the code extract you are showing above, it looks like you are using quite an outdated version of JSBSim. The code that is currently used in JSBSim in python/fpectl/fpectlmodule.cpp is shown below: jsbsim/python/fpectl/fpectlmodule.cpp Lines 143 to 185 in 49262a7 This is quite different from the code you showed (which is not compatible with Python 3 hence the compilation errors you get). May I ask where you got the code you are trying to compile ? Also, if you want to avoid building JSBSim yourself, be aware that we are providing:
So unless you are planning to hack the code of JSBSim I would encourage you to use one of the packages above. On the other hand, if you are planning to modify JSBSim code then we will be more happy to provide help as well. |
Beta Was this translation helpful? Give feedback.
-
Dear Bertrand Coconnier
Thank you for your support by the following email.
I try to rewrite the cpp to a python3 acceptable version but I am failing so far.
May I ask where you got the code you are trying to compile ?
I have tried to build Scrimmage which is an UAV simulator and I set its makefile's repository of JSBSIM as https://github.com/JSBSim-Team/jsbsim.git <https://github.com/JSBSim-Team/jsbsim.git>
If you can, please tell me the repository address of the newest version.
Thank you very much. I forget to use pip. I did “pip install jsbsim” just now and
it was successfully finished. So the newest version of jsbsim does not occur
these errors.
… 2020/11/22 20:01、Bertrand Coconnier ***@***.***>のメール:
Hi @kkz003 <https://github.com/kkz003> ,
According to the code extract you are showing above, it looks you are using quite an outdated version of JSBSim. The code that is currently used in JSBSim in python/fpectl/fpectlmodule.cpp <https://github.com/JSBSim-Team/jsbsim/blob/49262a7215402da1638caf75f17103a842a234fa/python/fpectl/fpectlmodule.cpp> is shown below:
https://github.com/JSBSim-Team/jsbsim/blob/49262a7215402da1638caf75f17103a842a234fa/python/fpectl/fpectlmodule.cpp#L143-L185 <https://github.com/JSBSim-Team/jsbsim/blob/49262a7215402da1638caf75f17103a842a234fa/python/fpectl/fpectlmodule.cpp#L143-L185>
This is quite different from the code you showed (which is not compatible with Python 3 hence the compilation errors you get).
May I ask where you got the code you are trying to compile ?
Also, if you want to avoid building JSBSim yourself, be aware that we are providing:
Ubuntu packages for our latest release v1.1.2 <https://github.com/JSBSim-Team/jsbsim/releases/tag/v1.1.2> .
Python packages that can be installed with pip.
So unless you are planning to hack the code of JSBSim I would encourage you to use one of the packages above.
On the other hand, if you are planning to modify JSBSim code then we will be more happy to provide help as well.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <https://github.com/JSBSim-Team/jsbsim/issues/347#issuecomment-731730161>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ARBP372CDMCM53XODKPMXZ3SRDVPPANCNFSM4T6FVVRA>.
|
Beta Was this translation helpful? Give feedback.
-
You don't need to as this has already been fixed in JSBSim code base.
That's weird, you are using the correct git repo for JSBSim but once again, the code you showed is quite outdated. Have you tried to build JSBSim from a fresh git clone ?
Great ! Do you still need support to build JSBSim ? Or are you planning to use the Python package ? |
Beta Was this translation helpful? Give feedback.
-
Dear bcoconni |
Beta Was this translation helpful? Give feedback.
-
OK I think I understand what you are trying to do. First thing first, I would try to build JSBSim alone from a fresh copy of the git repo: > mkdir test_JSBSim
> cd test_JSBSim
> git clone https://github.com/JSBSim-Team/jsbsim.git
> cd jsbsim
> mkdir build
> cd build
> cmake ..
> make
> ctest The last command Only once the commands above have completed successfully can we tell that your system is capable to compile JSBSim. If something fails at this stage, please provide the error messages so that we can understand what is going wrong. Regarding the CMake command you supplied, I am not familiar with
Other than these comments, you command |
Beta Was this translation helpful? Give feedback.
-
@kkz003 Has your problem been fixed ? Or do you need further support ? |
Beta Was this translation helpful? Give feedback.
-
Dear Bertrand Coconnier
Thank you for your email.
I cannot install scrimmage so far but your suggestion about JSBsim
solved one of my problem! I appreciate it.
sincerely yours
… 2020/12/05 22:21、Bertrand Coconnier ***@***.***>のメール:
@kkz003 <https://github.com/kkz003> Has your problem been fixed ? Or do you need further support ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <https://github.com/JSBSim-Team/jsbsim/issues/347#issuecomment-739250381>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ARBP377JLCN26WAQKIEQG3LSTIXVHANCNFSM4T6FVVRA>.
|
Beta Was this translation helpful? Give feedback.
-
This issue has been moved to "Discussions". Now that this new feature is available in GitHub, it has been decided to move issues related to support requests and questions to "Discussions" and restrict "Issues" to bugs and feature requests. |
Beta Was this translation helpful? Give feedback.
-
I cannot build this part on python3.8.5 and ubuntu 18.04.
I am very beginner. Some issue discussions are too difficult to understand to me.
I just change Py_InitModeule to Py_Initialize but it caused another complie errors.
Please give me any advice to solve this issue and build jsbsm.
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
/3rd-party/src/jsbsim/tests/fpectlmodule.cpp: In function ‘PyObject* initfpectl()’:
/3rd-party/src/jsbsim/tests/fpectlmodule.cpp:130:17: error: ‘Py_InitModule’ was not declared in this scope
PyObject m = Py_InitModule("fpectl", fpectl_methods);
^~~~~~~~~~~~~
/3rd-party/src/jsbsim/tests/fpectlmodule.cpp:130:17: note: suggested alternative: ‘Py_Initialize’
PyObject m = Py_InitModule("fpectl", fpectl_methods);
^~~~~~~~~~~~~
Py_Initialize
/3rd-party/src/jsbsim/tests/fpectlmodule.cpp:132:5: error: return-statement with no value, in function returning ‘PyObject {aka _object}’ [-fpermissive]
return;
^~~~~~
error: command 'gcc' failed with exit status 1
fpectlmodule.cpp
PyMODINIT_FUNC initfpectl(void)
{
PyObject *m = Py_InitModule("fpectl", fpectl_methods);
if (m == NULL)
return;
PyObject d = PyModule_GetDict(m);
fpe_error = PyErr_NewException((char)"fpectl.FloatingPointError",
PyExc_FloatingPointError, NULL);
if (fpe_error != NULL)
PyDict_SetItemString(d, "FloatingPointError", fpe_error);
}
Beta Was this translation helpful? Give feedback.
All reactions