[ https://issues.apache.org/jira/browse/THRIFT-3097?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marco Molteni updated THRIFT-3097: ---------------------------------- Description: if the optional libraries are not installed, the _default_ cmake build fails. h2. How to reproduce h3. Case 1 - "cmake -D WITH_LIBEVENT=OFF" (or just "cmake" on a system without libevent) - make {noformat} Linking CXX executable ../../bin/StressTest /usr/bin/ld: cannot find -lthriftnb {noformat} h3. Case 2 - "cmake" on a system with Python installed but *not* package python-dev - make {noformat} Building Python library /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'use_2to3' warnings.warn(msg) running build running build_py running build_ext building 'thrift.protocol.fastbinary' extension x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/protocol/fastbinary.c -o build/temp.linux-x86_64-2.7/src/protocol/fastbinary.o src/protocol/fastbinary.c:20:20: fatal error: Python.h: No such file or directory #include <Python.h> {noformat} h3. case 3 After installing libevent, on a system without ZLIB: {noformat} Linking CXX executable ../../bin/StressTestNonBlocking /usr/bin/ld: cannot find -lthriftz collect2: error: ld returned 1 exit status {noformat} h3. case 4 After installing ZLIB, either on a system without OpenSSL or on Ubuntu 14.10, where OpenSSL is installed but NOT found (another bug?) {noformat} Building CXX object test/cpp/CMakeFiles/TestClient.dir/src/TestClient.cpp.o In file included from /home/marco/src/thrift.marco.hg/test/cpp/src/TestClient.cpp:30:0: /home/marco/src/thrift.marco.hg/lib/cpp/src/thrift/transport/TSSLSocket.h:25:25: fatal error: openssl/ssl.h: No such file or directory #include <openssl/ssl.h> {noformat} https://github.com/apache/thrift/pull/443 was: if the optional libraries are not installed, the _default_ cmake build fails. h2. How to reproduce h3. Case 1 - "cmake -D WITH_LIBEVENT=OFF" (or just "cmake" on a system without libevent) - make {noformat} Linking CXX executable ../../bin/StressTest /usr/bin/ld: cannot find -lthriftnb {noformat} h3. Case 2 - "cmake" on a system with Python installed but *not* package python-dev - make {noformat} Building Python library /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'use_2to3' warnings.warn(msg) running build running build_py running build_ext building 'thrift.protocol.fastbinary' extension x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/protocol/fastbinary.c -o build/temp.linux-x86_64-2.7/src/protocol/fastbinary.o src/protocol/fastbinary.c:20:20: fatal error: Python.h: No such file or directory #include <Python.h> {noformat} h3. case 3 After installing libevent, on a system without ZLIB: {noformat} Linking CXX executable ../../bin/StressTestNonBlocking /usr/bin/ld: cannot find -lthriftz collect2: error: ld returned 1 exit status {noformat} h3. case 4 After installing ZLIB, either on a system without OpenSSL or on Ubuntu 14.10, where OpenSSL is installed but NOT found (another bug?) {noformat} Building CXX object test/cpp/CMakeFiles/TestClient.dir/src/TestClient.cpp.o In file included from /home/marco/src/thrift.marco.hg/test/cpp/src/TestClient.cpp:30:0: /home/marco/src/thrift.marco.hg/lib/cpp/src/thrift/transport/TSSLSocket.h:25:25: fatal error: openssl/ssl.h: No such file or directory #include <openssl/ssl.h> {noformat} Will issue a github pull request. Patch Info: Patch Available Github pull request: https://github.com/apache/thrift/pull/443 > cmake targets unconditionally depend on optional libraries > ---------------------------------------------------------- > > Key: THRIFT-3097 > URL: https://issues.apache.org/jira/browse/THRIFT-3097 > Project: Thrift > Issue Type: Bug > Affects Versions: 1.0 > Environment: Bug found on Linux Ubuntu 14.10, but it should be > present anywhere. > Reporter: Marco Molteni > > if the optional libraries are not installed, the _default_ cmake build fails. > h2. How to reproduce > h3. Case 1 > - "cmake -D WITH_LIBEVENT=OFF" (or just "cmake" on a system without libevent) > - make > {noformat} > Linking CXX executable ../../bin/StressTest > /usr/bin/ld: cannot find -lthriftnb > {noformat} > h3. Case 2 > - "cmake" on a system with Python installed but *not* package python-dev > - make > {noformat} > Building Python library > /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution > option: 'use_2to3' > warnings.warn(msg) > running build > running build_py > running build_ext > building 'thrift.protocol.fastbinary' extension > x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g > -fstack-protector-strong -Wformat -Werror=format-security -fPIC > -I/usr/include/python2.7 -c src/protocol/fastbinary.c -o > build/temp.linux-x86_64-2.7/src/protocol/fastbinary.o > src/protocol/fastbinary.c:20:20: fatal error: Python.h: No such file or > directory > #include <Python.h> > {noformat} > h3. case 3 > After installing libevent, on a system without ZLIB: > {noformat} > Linking CXX executable ../../bin/StressTestNonBlocking > /usr/bin/ld: cannot find -lthriftz > collect2: error: ld returned 1 exit status > {noformat} > h3. case 4 > After installing ZLIB, either on a system without OpenSSL or on Ubuntu 14.10, > where OpenSSL is installed but NOT found (another bug?) > {noformat} > Building CXX object test/cpp/CMakeFiles/TestClient.dir/src/TestClient.cpp.o > In file included from > /home/marco/src/thrift.marco.hg/test/cpp/src/TestClient.cpp:30:0: > /home/marco/src/thrift.marco.hg/lib/cpp/src/thrift/transport/TSSLSocket.h:25:25: > fatal error: openssl/ssl.h: No such file or directory > #include <openssl/ssl.h> > {noformat} > https://github.com/apache/thrift/pull/443 -- This message was sent by Atlassian JIRA (v6.3.4#6332)