TheCrazyT / roboschool

Open-source software for robot simulation, integrated with OpenAI Gym.
Other
5 stars 0 forks source link

Boost.Python.ArgumentError on cross-compiled version #2

Closed TheCrazyT closed 6 years ago

TheCrazyT commented 6 years ago

Sadly still fails on cross-compiled build with the same error mentioned here: https://github.com/openai/roboschool/issues/23

I need to figure out why. The normal build on windows with codeblocks+mingw worked.

TheCrazyT commented 6 years ago

Although i fixed this now on production branch i now have the problem with an endless loop. ( solved it by removing the following flags: -std=c++11 -Wall -Wno-unused-variable -Wno-unused-function -Wno-deprecated-register -fPIC -DBT_USE_DOUBLE_PRECISION -march=native )

The file libPhysicsClientC_API.dll seems to produce the problem, no clue why. (Edit:
inside the function BulletMJCFImporter::loadMJCF(char const, MJCFErrorLogger, bool) looks like the get_line never sets the eof flag for some reason, resulting in an endless loop. )

TheCrazyT commented 6 years ago

No clue why but maybe fstream is buggy, even this small cross compiled example creates an endless loop:

#include <string>
#include <iostream>
#include <fstream>

int main(int argc,char* argv){
    std::string xml_string;
    std::fstream xml_file ("d:\\WinRoboschool2\\roboschool\\mujoco_assets/ground_plane.xml",std::fstream::in);
    while (xml_file.good())
    {                       
        std::string line;   
        std::getline( xml_file, line);
        xml_string += (line + "\n");
    }
    xml_file.close();
}

compiled with: x86_64-w64-mingw32-g++ -g -O0 fstreamtest.cpp version used: 7.2-win32 20171205