Comments (9)
STATIC flag including in CMakeLists.txt (with a few more set
to properly find the dependency librairies)
from uts-server.
Using -DSTATIC=ON works partially. For uts-server - ok, but for civetweb it uses dynamic libs:
[ 41%] Performing configure step for 'civetweb'
...
-- Found LibRt: /usr/lib64/librt.so
-- Found OpenSSL: /usr/lib64/libssl.so;/usr/lib64/libcrypto.so (found version "1.0.1e")
from uts-server.
I've done some modifications:
- forwarding the OPENSSL_USE_STATIC_LIBS flag in civetweb external project.
- adding a
CIVETWEB_CUST_ARGS
to pass any additional options/args to the civetweb build.
For example, to solve the dynamic librt.o:
cmake . -DBUNDLE_CIVETWEB=ON -DSTATIC=ON -DLINK_GCC_S=ON -DCIVETWEB_CUST_ARGS="-DLIBRT_LIBRARIES=/usr/lib/librt.a"
from uts-server.
Using your example:
cmake . -DBUNDLE_CIVETWEB=ON -DSTATIC=ON -DCIVETWEB_CUST_ARGS="-DLIBRT_LIBRARIES=/usr/lib64/librt.a"
:
[ 41%] Performing configure step for 'civetweb'
...
-- Found LibRt: /usr/lib64/librt.a
-- Found OpenSSL: /usr/lib64/libssl.so;/usr/lib64/libcrypto.so (found version "1.0.1e")
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
OPENSSL_USE_STATIC_LIBS
and it use shared libs.
If I use -DCIVETWEB_CUST_ARGS="-DLIBRT_LIBRARIES=/usr/lib64/librt.a -DOPENSSL_LIBRARIES=/usr/lib64/libssl.a;/usr/lib64/libcrypto.a"
, another error was:
[ 16%] Performing configure step for 'civetweb'
...
-- Found LibRt: /usr/lib64/librt.a -DOPENSSL_LIBRARIES=/usr/lib64/libssl.a
May be it's better to mandatory use the same ${OPENSSL_INCLUDE_DIR}, ${OPENSSL_LIBRARIES}, discovered by find_package, during civetweb makefile creation? There is no sense to build civetweb with one version of openssl and uts-server with another.
from uts-server.
Alternatively, you can build the civetweb project separately. That way you will have complete access to the compilation options specific to your use case.
I've added the BUNDLE_CIVETWEB
option mostly for easily trying out uts-server. I would not consider it as a proper way to build a production ready binary. Having an external download in a build sequence is not the best idea ever, recovering the master branch is even worst.
I should have added a warning in the documentation...
from uts-server.
Yes, may be it'll be better. At first glance, it seems that the -DBUNDLE_CIVETWEB=ON is "officially recommended" way. I already was going to ask you how to build this zoo separately ))
from uts-server.
And BTW, what branch to use - civetweb/civetweb, or kakwa/civetweb?
from uts-server.
I will put more clear notifications on the recommended way to install uts-server.
For the civetweb/civetweb kakwa/civetweb branch:
- If you are using OpenSSL < 1.1.0 use lastest tag of civetweb/civetweb
- If you are using OpenSSL >= 1.1.0 use the master branch of civetweb/civetweb. At least for now, the current release (1.9.1) doesn't include the OpenSSL 1.1.0 API support.
Hopefully, there will be a new release of civetweb soon, but it's entirely up to the civetweb maintainer, not me ^^.
The story behind it is that the OpenSSL 1.1.0 API support was added by a PR I submitted to civetweb/civetweb. But while the PR wasn't merged, I change the civetweb url to my fork in order to support OpenSSL >= 1.1.0 and it kind of stay that way even if the PR was merged a while ago.
For reference, the PR: civetweb/civetweb#384
from uts-server.
Commit 55dea70 modify the doc to explicitly state BUNDLE_CIVETWEB=ON
as developpment/testing only, and not recommended for production
from uts-server.
Related Issues (13)
- C99 mode error HOT 2
- PKCS11 HOT 1
- kakwa/civetweb HOT 1
- compile failed on CentOS 7 HOT 1
- dockerize it HOT 8
- uts-server does not respect digest algorithm
- Source for Time Stamp Certificate HOT 1
- sed error on FreeBSD HOT 6
- Crashes when used with C2PA
- zlib HOT 2
- FreeBSD CLang problem HOT 3
- duplication parameters HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uts-server.