lpereira / lwan

Experimental, scalable, high performance HTTP server

Home Page:https://lwan.ws

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compile error on Debian v 9.13.0 Stretch

DagothDeer opened this issue · comments

Hi. Like your Lwan web server.

Work and compiled without problem on "ubuntu-20.04.1-live-server-amd64", but Ubuntu is more heavy than Debian.
So, i try to compile it on Debian (i know that its not present in your OS list). Im took this list for Ubuntu: "git cmake zlib1g-dev pkg-config lua5.1-dev libsqlite3-dev libmysqlclient-dev", but replace "libmysqlclient-dev" with "default-libmysqlclient-dev". All additional packages where installed without problem, but when i start "make" step - I saw some errors.
You can see it on screenshot.
Please, can You help me to build it on Debian v 9.13.0 Stretch?

P.S. Your Lwan will be used as a multi-backend to distribute the load on a highly loaded site. Therefore, disk space, as well as the amount of RAM used for the operating system, are very important to me. Debian is better than Ubuntu in this case.

Sorry for Russsian language on screen.
I translate it for You.
"Ошибка" == "Error".
"Ошибка выполнения рецепта для цели" == "recipe for target".

123

Привет. This seems to be a duplicate of issue #123.

Can you apply this patch and see if the build succeeds?

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f7556aa8..e74910fc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -227,12 +227,6 @@ if (${CMAKE_BUILD_TYPE} MATCHES "Rel")
        enable_c_flag_if_avail(-malign-data=abi C_FLAGS_REL HAVE_ALIGN_DATA)
        enable_c_flag_if_avail(-fno-asynchronous-unwind-tables C_FLAGS_REL HAVE_NO_ASYNC_UNWIND_TABLES)
 
-       enable_c_flag_if_avail(-flto=jobserver C_FLAGS_REL HAVE_LTO_JOBSERVER)
-       if (NOT HAVE_LTO_JOBSERVER)
-               enable_c_flag_if_avail(-flto C_FLAGS_REL HAVE_LTO)
-       endif ()
-
-       enable_c_flag_if_avail(-ffat-lto-objects C_FLAGS_REL HAVE_LTO_FAT_OBJS)
        enable_c_flag_if_avail(-mcrc32 C_FLAGS_REL HAVE_BUILTIN_IA32_CRC32)
 endif ()

(You can apply the patch with a command like patch -p1, pasting this diff into the terminal, and pressing Ctrl-D in a blank line.)

If it does succeed, could you please confirm the compiler and version that are being used here? I only have a Debian 10 system running here and it works for me. I was never able to reproduce #123, and I'd like to understand what's the problem here.

Thanks for the answer.
Of course, I will try to install this patch, but later, because the machine is not at hand now.

Many thanks.
Commenting out the lines helped.

111

Did you ask about this?

123

Good to know it worked. At least you'll be able to see if Lwan will live up to the promise for your highly loaded site now. Unfortunately, this workaround disables a useful optimization, so I still want to know what causes it.

Run the gcc --version command to determine the GCC version.

I can send You an ISO image of the system.

Thank You very much for help.

Would you mind telling me the site where Lwan will be used at? I'm always curious to see what people are using it for.

At this moment my project has not been launched yet and it is in the process of development and assembly.
Your web server "Lwan" is part of this project, it was chosen as a lightweight and fast backend that will be behind the load balancers "Envoy Proxy" and ideally the monitoring system "Prometheus" should monitor this whole assembly. It already has good "Envoy Proxy" support.
I wanted to have support for assembling various metrics from the "Lwan" backend itself. Moreover, as you already answered in Issue #167: You don't want to write logs directly to the file. My partner and I also believe that recording and viewing hundreds and thousands of individual log files is not only slow (heavily loads the disk subsystem), but also extremely inefficient in terms of time-consuming (searching for the required log file, viewing and analyzing it). We try to collect all logs, or rather metrics, centrally, for example, in the "InfluxDB" or "MongoDB" databases, and from there to carry out data processing (drawing graphs, displaying triggers, etc.).
In our opinion, "Prometheus" is a good candidate for solving this problem.

What I described above is only a small part of the system. When we complete the development and assembly of this project with a partner and launch it, we can show what happened without any problems.

My partner and I will also be very interested to see how all this will behave in production.

For documentation sake: this is also a dupe of #294.

Hello, @lpereira. Installation on last stable build Debian v10.9.0-amd64 was successful, but the compiler showed one warning.

Is this not a critical warning?
123

Ok, thanks for the answer.