lpereira / lwan

Experimental, scalable, high performance HTTP server
https://lwan.ws
GNU General Public License v2.0
5.92k stars 549 forks source link

Compile error on Debian v 9.13.0 Stretch #301

Open DagothDeer opened 3 years ago

DagothDeer commented 3 years ago

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

lpereira commented 3 years ago

Привет. 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.

DagothDeer commented 3 years ago

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

DagothDeer commented 3 years ago

Many thanks. Commenting out the lines helped.

111

DagothDeer commented 3 years ago

Did you ask about this?

123

lpereira commented 3 years ago

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.

DagothDeer commented 3 years ago

123

DagothDeer commented 3 years ago

I can send You an ISO image of the system.

lpereira commented 3 years ago

6.3? That's really odd. There's no need to send the ISO, I can download it from Debian. Thanks, though. (It's going to take a while for me to fix it though because I'm taking a break from open source work.)

On Sat, Mar 6, 2021, 04:38 DagothDeer notifications@github.com wrote:

I can send you an ISO image of the system.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lpereira/lwan/issues/301#issuecomment-791930517, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAADVGNZIK2PMRRZ33WFSTLTCIO3HANCNFSM4YWTUBCQ .

DagothDeer commented 3 years ago

Thank You very much for help.

lpereira commented 3 years ago

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.

DagothDeer commented 3 years ago

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.

DagothDeer commented 3 years ago

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.

lpereira commented 3 years ago

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

DagothDeer commented 3 years ago

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

lpereira commented 3 years ago

Nope. It only affects the "clock" sample, so if you're not using it, you're good.

On Wed, Mar 31, 2021, 08:22 DagothDeer @.***> wrote:

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? [image: 123] https://user-images.githubusercontent.com/33806067/113168886-be6ec680-924d-11eb-96a6-f34f62e32a05.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lpereira/lwan/issues/301#issuecomment-811152010, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAADVGIPG66FERXIH43FTATTGM42XANCNFSM4YWTUBCQ .

DagothDeer commented 3 years ago

Ok, thanks for the answer.