-
Notifications
You must be signed in to change notification settings - Fork 182
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
FreeBSD: Error while building caused by Linux Poll #56
Comments
Hello @bluecub , The error you have looks pretty much straight forward, but the fix isn't. According to the FreeBSD poll manpage, you need to enable the macro So if it works with CMake, can you install it with CMake, then make sure the websocket_example works as well? After that, you can try to properly build Ulfius with the Makefile. You can try to manually define Would you come back to me with some feedbacks? |
Hi, i got the same error using cmake. I will try some options and get back to you. Thanks |
The only way I got it to work is by defining the POLLRDHUP manually which is not ideal but it worked for the time being.
Cheers |
Thanks @bluecub , I'll add this to the master branch then. Although, can you validate that the The Concerning the portability, I understand your concerns but I do this on my free time with my limited resources, and I'm more used to linux than other systems. So I prefer to rely on experts of other systems to help with the portability, like this, rather than making bad portable code that I won't even know it's bad since I don't use it... |
That's very good news! I'll wait for your feedbacks, thanks a lot for your help! |
Hi @babelouest I built it using make though (gmake in FreeBSD context, it stands for GNU make while make is the BSD make, and it can be installed from the port system quite easily) as I am not familiar with cmake, yet I agree cmake is best tool for the job. My bad for being lazy! What I changed is pretty much the Makefile in all lib/yder/src/Makefile, lib/orcania/src/Makefile, and src/Makefile. Please feel free to close this thread if you are satisfied. And thanks for putting the effort to write and share this library. It definitely fills a gap in the C ecosystem. Cheers :) |
Thanks for the feedback @bluecub , Concerning the changes you made to the Makefile, you can also make it like that:
Concerning the symlink you manually create, this is probably due to the I assume that if the regular Makefile works on your FreeBSD now, so the CMake will work as well, and you probably won't have to patch it: $ cd ulfius
$ mkdir build
$ cd build
$ cmake ..
$ make && sudo make install |
Very True if you add those env variables for LD lib and include path, cmake as it is works fine and no need for symbolic links or anything else. Yet I was hoping that cmake can be configured in such a way to do the build without any extra manual steps so the build works out of the box for FreeBSD. |
It doesn't? |
Hey. I meant without the need to set the env variables. Well, I added to CMAKE_C_FLAGS in the 3 CMakeLists.txt files for ulfius, yder, and orcania the -I/usr/local/include. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -I/usr/local/include") Thanks |
Hello, Better off using the CMake command In the CMake documentation, it says you can specify the target directory, I've seen 2 methods so far: $ cmake ..
$ make DESTDIR=/usr && sudo make install Or $ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
$ make && sudo make install I'd rather document this feature than adding absolute paths in the |
I can try those options and see if that would solve the issue. I prefer not to set environments variables as it is easier for me to add Ulfuis to the port system later on. |
I understand, and I agree, but maybe a solution is to pass options to cmake when you build the port. Debian packages can be built like that, I imagine freebsd ports can too. |
Sure, Will work on it tomorrow and confirm. Almost there.. |
I've made some changes in the cmake scripts for ulfius, yder and orcania to fix the include local path. I've tested it on a fresh FreeBSD instance and ulfius installed successfully. Can you check as well with the last master branches? |
Awesome, well done.... it works like a charm now. |
Hi again,
I asked you sometime ago about building ulfius on FreeBSD and we got the cmake working yet I have been super busy since then.
Now I’m looking at the library again so returned to the code and all seems fine, I decided to use the normal make (not cmake and just updated the clags and lib to include /usr/local/lib and /usr/local/include - would be easier for me in the future to port to FreeBSD port system).
Both orcania and yder were built fine (and created symbolic links for the libs will add that to make later)
yet when I arrived to last make command, it threw an error (last time I had the same issue when I was working on cmake as well).
Thanks so much...
The text was updated successfully, but these errors were encountered: