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

Master fails to compile #51

Open
davglass opened this issue Oct 1, 2018 · 1 comment · May be fixed by #56
Open

Master fails to compile #51

davglass opened this issue Oct 1, 2018 · 1 comment · May be fixed by #56

Comments

@davglass
Copy link
Contributor

davglass commented Oct 1, 2018

I was revisiting an old project I had in order to get some notifications out of my 2 Flux's and I can't seem to get the client to compile any longer..

Example Dockerfile

FROM ubuntu
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install iputils-ping net-tools curl vim build-essential libxml2-dev libxslt1-dev libjpeg8-dev zlib1g-dev python3 python3-dev python3-setuptools git libpcl-dev python3-pip --yes

RUN pip3 install Pillow numpy scipy setuputils3 pycrypto cython
RUN pip3 list
RUN mkdir -p /flux

RUN git clone https://github.com/flux3dp/fluxclient.git /flux/client
RUN cd /flux/client && python3 ./setup.py install

Error:

creating build/temp.linux-x86_64-3.6/src/scanner
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/eigen3 -I/usr/include/pcl-1.8 -I/usr/include/python3.6m -c src/scanner/scan_module.cpp -o build/temp.linux-x86_64-3.6/src/scanner/scan_module.o -lstdc++ -std=c++11
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/eigen3 -I/usr/include/pcl-1.8 -I/usr/include/python3.6m -c src/scanner/scanner.cpp -o build/temp.linux-x86_64-3.6/src/scanner/scanner.o -lstdc++ -std=c++11
x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.6/src/scanner/scan_module.o build/temp.linux-x86_64-3.6/src/scanner/scanner.o -L -lpcl_common -lpcl_octree -lpcl_io -lpcl_kdtree -lpcl_search -lpcl_sample_consensus -lpcl_filters -lpcl_features -lpcl_segmentation -lpcl_surface -lpcl_registration -lpcl_keypoints -o build/lib.linux-x86_64-3.6/fluxclient/scanner/_scanner.cpython-36m-x86_64-linux-gnu.so
cythoning src/printer/printer.pyx to src/printer/printer.cpp
building 'fluxclient.printer._printer' extension
creating build/temp.linux-x86_64-3.6/src/printer
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/eigen3 -I/usr/include/pcl-1.8 -I/usr/include/python3.6m -c src/printer/printer_module.cpp -o build/temp.linux-x86_64-3.6/src/printer/printer_module.o -lstdc++ -std=c++11
src/printer/printer_module.cpp: In function 'int setPoints(MeshPtr, std::vector<std::vector<float> >)':
src/printer/printer_module.cpp:44:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
src/printer/printer_module.cpp: In function 'int write_stl_binary(MeshPtr, const char*)':
src/printer/printer_module.cpp:412:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/eigen3 -I/usr/include/pcl-1.8 -I/usr/include/python3.6m -c src/printer/printer.cpp -o build/temp.linux-x86_64-3.6/src/printer/printer.o -lstdc++ -std=c++11
x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.6/src/printer/printer_module.o build/temp.linux-x86_64-3.6/src/printer/printer.o -L -lpcl_common -lpcl_octree -lpcl_io -lpcl_kdtree -lpcl_search -lpcl_sample_consensus -lpcl_filters -lpcl_features -lpcl_segmentation -lpcl_surface -lpcl_registration -lpcl_keypoints -o build/lib.linux-x86_64-3.6/fluxclient/printer/_printer.cpython-36m-x86_64-linux-gnu.so
cythoning src/utils/utils.pyx to src/utils/utils.cpp
building 'fluxclient.utils._utils' extension
creating build/temp.linux-x86_64-3.6/src/utils
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Isrc/printer/ -I/usr/include/python3.6m -c src/utils/g2f_module.cpp -o build/temp.linux-x86_64-3.6/src/utils/g2f_module.o -lstdc++ -std=c++11
src/utils/g2f_module.cpp: In function 'int convert_to_fcode_by_line(char*, FCode*, char*)':
src/utils/g2f_module.cpp:555:25: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
         fc->HEAD_TYPE = "LASER";
                         ^~~~~~~
src/utils/g2f_module.cpp:397:9: warning: unused variable 'data_output' [-Wunused-variable]
   char* data_output;
         ^~~~~~~~~~~
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Isrc/printer/ -I/usr/include/python3.6m -c src/utils/utils_module.cpp -o build/temp.linux-x86_64-3.6/src/utils/utils_module.o -lstdc++ -std=c++11
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Isrc/printer/ -I/usr/include/python3.6m -c src/utils/utils.cpp -o build/temp.linux-x86_64-3.6/src/utils/utils.o -lstdc++ -std=c++11
src/utils/utils.cpp: In function 'PyObject* __pyx_f_10fluxclient_5utils_6_utils_15GcodeToFcodeCpp_extract_vector(__pyx_obj_10fluxclient_5utils_6_utils_GcodeToFcodeCpp*, PyObject*, int)':
src/utils/utils.cpp:3340:15: error: no match for 'operator=' (operand types are 'PathVector' and 'PyObject* {aka _object*}')
   __pyx_v_v = __pyx_v_obj;
               ^~~~~~~~~~~
In file included from src/utils/utils_module.h:1:0,
                 from src/utils/utils.cpp:587:
src/utils/path_vector.h:10:3: note: candidate: PathVector& PathVector::operator=(const PathVector&)
 } PathVector;
   ^~~~~~~~~~
src/utils/path_vector.h:10:3: note:   no known conversion for argument 1 from 'PyObject* {aka _object*}' to 'const PathVector&'
src/utils/path_vector.h:10:3: note: candidate: PathVector& PathVector::operator=(PathVector&&)
src/utils/path_vector.h:10:3: note:   no known conversion for argument 1 from 'PyObject* {aka _object*}' to 'PathVector&&'
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
The command '/bin/sh -c cd /flux/client && python3 ./setup.py install' returned a non-zero code: 1
@oscaracena
Copy link

oscaracena commented Oct 3, 2020

Hi, did you resolve this issue in any way? Thanks.

Well, if anyone encounters this, as a workaround, comment out the method definition extract_vector at src/utils/utils.pyx:170. I've searched it and is not used anywhere, so I presume is safe to remove it.

monotonee added a commit to monotonee/fluxclient that referenced this issue Apr 12, 2021
Resolves flux3dp#51. This particular method was causing a compilation
error in generated C code. Given that this issue remained
unaddressed for several years, and that this method is never called,
deleteing it appears both safe and conducive to a cleaner codebase.
monotonee added a commit to monotonee/fluxclient that referenced this issue Apr 12, 2021
Resolves flux3dp#51. This particular method was causing a compilation
error in generated C code. Given that this issue remained
unaddressed for several years, and that this method is never called,
deleting it appears both safe and conducive to a cleaner codebase.
@monotonee monotonee linked a pull request Apr 12, 2021 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants