Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-fpermissive required to compile Swig generated cpp files #62

Open
kkremitzki opened this issue Dec 28, 2019 · 0 comments
Open

-fpermissive required to compile Swig generated cpp files #62

kkremitzki opened this issue Dec 28, 2019 · 0 comments

Comments

@kkremitzki
Copy link
Member

David Daish created an issue 2019-03-05

When the build script reached the point where the Swig generated coin_wrap.cpp files are compiled by GCC, the build would fail if it wasn't also given the flag -fpermissive.

I'm not an expert, but I believe this is unsafe, and I felt it appropriate to document this here.

Comments (1)

    John Soo

    I am experiencing this as well. Here is the error gcc gives:

    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/gnu/store/b7fqhszxl02g6pfm3vw6b3cjz472qrly-python-3.7.0/include/python3.7m -c pivy/coin_wrap.cpp -o build/temp.linux-x86_64-3.7/pivy/coin_wrap.o -Iinterfaces -I/gnu/store/l6mkj46jllqwl6i9ywzl0k5ks760wf30-coin3D-4.0.0a-1.8d860d7/include -I/gnu/store/l6mkj46jllqwl6i9ywzl0k5ks760wf30-coin3D-4.0.0a-1.8d860d7/include/Inventor/annex -Wno-unused -Wno-maybe-uninitialized
    pivy/coin_wrap.cpp: In function ‘void SoSensorPythonCB(void*, SoSensor*)’:
    pivy/coin_wrap.cpp:6342:40: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
         sensor_cast_name = PyUnicode_AsUTF8(item);
                                            ^
    pivy/coin_wrap.cpp: In function ‘void SoMarkerSet_addMarker__SWIG_3(int, const SbVec2s&, PyObject*, SbBool, SbBool)’:
    pivy/coin_wrap.cpp:7236:43: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
                 coin_marker = PyUnicode_AsUTF8(string);
                                               ^
    error: command 'gcc' failed with exit status 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant