Comments (16)
It's even better than that, thanks to CMake's magic!
All you need is to pass the argument -DWITH_JOURNALD=off
to cmake when you build Ulfius and this options will be passed to sub libraries, so Yder will be built without systemd support.
$ cd <ulfius source>
$ mkdir build
$ cd build
$ cmake -DWITH_JOURNALD=off ..
$ make && sudo make install
from ulfius.
Sorry, I misread you last message and mixed /usr/include
and /usr/local/include
.
I could add a constant path in the include search but I'd rather keep this script as much system agnostic as possible.
Can you check, then maybe change your environment variable C_INCLUDE_PATH
and see if it works?
See:
http://www.network-theory.co.uk/docs/gccintro/gccintro_23.html
https://docs.freebsd.org/info/gcc/gcc.info.Environment_Variables.html
from ulfius.
Thanks
from ulfius.
Hello @bluecub ,
Thanks for the support!
The quick workaround is to build yder without systemd logging, then install ulfius:
$ git clone https://github.com/babelouest/yder.git
$ cd yder/
$ mkdir build
$ cd build
$ cmake .. -DWITH_JOURNALD=off
$ make && sudo make install
$ cd ../../ulfius # or cd /path/to/ulfius/source
$ mkdir build && cd build
$ cmake .. && make && sudo make install
This should fix your problem.
I'll also add the option -DWITH_JOURNALD
to Ulfius CMake script as well so systems without systemd installed will be able to install Ulfius more easily.
About FreeBSD port of Ulfius, I would like to have one, although I don't know nor use any *BSD on a daily basis.
So I'm very cool with the idea, but I can't make it myself at the moment. If you volunteer to make a BSD port, that would be awesome!
from ulfius.
Thanks I will try it and let you know how it goes. Cheers
from ulfius.
Thanks so much, I really appreciate your support ... had another tiny issue which I will look into it as Iām not familiar with cmake. FreeBSD keeps user installed lib in /usr/local/lib and /usr/local/include and to link it is needed to add the path in cmake.
Cheers
from ulfius.
Maybe try with DESTDIR
: https://cmake.org/cmake/help/v3.0/variable/CMAKE_INSTALL_PREFIX.html
$ make DESTDIR=/home/john install
from ulfius.
The error I am getting is as below because it seems CMake does not find headers installed in /usr/local/include by default. On FreeBSD by default the local is /usr/local/include.
make
[ 7%] Building C object orcania-build/CMakeFiles/orcania.dir/src/base64.c.o
In file included from /home/code/app/lib/ulfius/build/orcania-src/src/base64.c:10:
/home/code/app/lib/ulfius/build/orcania-src/src/../include/orcania.h:14:10: fatal error: 'jansson.h' file not found
#include <jansson.h>
^~~~~~~~~~~
The solution I guess must be something like this... yet I am not sure where I should add this
if(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
set(CMAKE_REQUIRED_INCLUDES "/usr/local/include" "/usr/include")
endif()
from ulfius.
That's weird, because /usr/include
is the default include path for Linux as well. So it should look in this path as well obviously.
How did you install jansson library? Using the source, a freeBSD port, something else?
from ulfius.
Yes using FreeBSD ports. All user installed libs go to /usr/local/lib and headers to /usr/local/include. In normal make I add those in the CFLags.
from ulfius.
$pkgconf --cflags jansson
-I/usr/local/include
from ulfius.
I want to add that path to which file in the package I should add it?
Thanks
from ulfius.
Can you try with the environment variable first?
from ulfius.
Environment variable solved that issue. Thanks :)
from ulfius.
Awesome!
I'll add this in the install document :)
from ulfius.
@bluecub , if Ulfius builds completely on your FreeBSD, I'd close this issue then.
If you have other problems or concerns, don't hesitate to open a new issue on the repo.
from ulfius.
Related Issues (20)
- [Issue] example_programs: build failed HOT 4
- [Issue] simple_example: build failed HOT 1
- ulfius_add_endpoint_by_val() url_prefix VS. url_format HOT 2
- HTTP GET with array as response body HOT 2
- simple_example as static build for managed server HOT 2
- undefined reference to `pointer_list_init' HOT 2
- How to setup https mode? HOT 4
- Sending file in response for Ulfius REST request
- Do we have any official Ulifius Yocto recipe? HOT 1
- How can I reopen a closed issue? HOT 4
- [Issue]../../src/libulfius.so: undefined reference to `[email protected]' HOT 1
- [Issue] A use after free bug in src/ulfius.c HOT 1
- [Issue]A double free bug in ulfius.c HOT 4
- [Issue]A use after free bug in src/ulfius.c HOT 1
- [Feature request] How to use libulfius to implement a secure, asynchronious and scalable REST API? HOT 3
- What is the best way to let libulfius interact with libpq? HOT 2
- uwsc can't connect to socket while wscat can HOT 2
- Ulfius failed to link microhttpd on mingw64 using CMake HOT 4
- Support for graceful shutdown HOT 2
- How to add swagger openAPI documentation for ulfius based webservices ? HOT 3
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 ulfius.