<feed xmlns='http://www.w3.org/2005/Atom'>
<title>unit.git/auto/make, branch master</title>
<subtitle>Universal Web Application Server</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/'/>
<entry>
<title>auto/make: Fix various issues with building OTEL</title>
<updated>2025-01-10T04:16:09+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2025-01-09T03:55:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=d0dbba3b9f2f6a2e0e0d6e9862a4c6c1ab603242'/>
<id>d0dbba3b9f2f6a2e0e0d6e9862a4c6c1ab603242</id>
<content type='text'>
There were at least a couple of issues with building OTEL support.

It only worked with GNU make due to the use of ifeq, even gmake had some
issues.

Debug builds were broken due to trying to pass --debug to cargo which is
the default and isn't a valid option.

This 'fixes' things by doing 'release' builds of OTEL by default.

Passing D=1 to make will generate 'debug' builds but this as previously
with D= etc, only works with GNU make.

We make use of the '--emit link=' rustc option to place the libotel.a
static library into build/lib

This is good, it consolidates the static libraries into one place and it
simplifies the build scripts.

While we're at it pretty print the cargo command by default.

Fixes: 9d3dcb800 ("otel: add build tooling to include otel code")
Link: &lt;https://github.com/nginx/unit/pull/1520#issuecomment-2556265063&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There were at least a couple of issues with building OTEL support.

It only worked with GNU make due to the use of ifeq, even gmake had some
issues.

Debug builds were broken due to trying to pass --debug to cargo which is
the default and isn't a valid option.

This 'fixes' things by doing 'release' builds of OTEL by default.

Passing D=1 to make will generate 'debug' builds but this as previously
with D= etc, only works with GNU make.

We make use of the '--emit link=' rustc option to place the libotel.a
static library into build/lib

This is good, it consolidates the static libraries into one place and it
simplifies the build scripts.

While we're at it pretty print the cargo command by default.

Fixes: 9d3dcb800 ("otel: add build tooling to include otel code")
Link: &lt;https://github.com/nginx/unit/pull/1520#issuecomment-2556265063&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>auto/make: Add missing NXT_OTEL_LIB_STATIC to some C tests</title>
<updated>2025-01-10T04:16:09+00:00</updated>
<author>
<name>Remi Collet</name>
<email>remi@remirepo.net</email>
</author>
<published>2024-12-20T08:16:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=bfb86ed0b97f886f1e979d3e68a04585af1792f4'/>
<id>bfb86ed0b97f886f1e979d3e68a04585af1792f4</id>
<content type='text'>
Fixes: 9d3dcb800 ("otel: add build tooling to include otel code")
[ Commit subject, s/NXT_OTEL_LIB_LOC/NXT_OTEL_LIB_STATIC/ and placement
  of NXT_OTEL_LIB_STATIC tweaked as per @thresheek - Andrew ]
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes: 9d3dcb800 ("otel: add build tooling to include otel code")
[ Commit subject, s/NXT_OTEL_LIB_LOC/NXT_OTEL_LIB_STATIC/ and placement
  of NXT_OTEL_LIB_STATIC tweaked as per @thresheek - Andrew ]
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>auto/make, otel: fix linking on macOS and Ubuntu</title>
<updated>2025-01-10T04:16:09+00:00</updated>
<author>
<name>Konstantin Pavlov</name>
<email>thresh@nginx.com</email>
</author>
<published>2024-12-19T23:47:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=854a52ce6b75a434a4d2b89d306024c84b9c670f'/>
<id>854a52ce6b75a434a4d2b89d306024c84b9c670f</id>
<content type='text'>
The static library is supposed to be specified prior to its
dependencies.
Also, no need to put an otel static library inside libnxt static
library, as we explicitely link unit binary with otel static library
anyway.

This fixes the following build problems:

- macOS:

      Finished `release` profile [optimized] target(s) in 58.07s
    AR     build/lib/libnxt.a
    LD     build/sbin/unitd
  ld: archive member 'libotel.a' not a mach-o file in '/private/tmp/unit-20241219-8965-yb46xp/build/lib/libnxt.a'
  clang: error: linker command failed with exit code 1 (use -v to see invocation)

- Ubuntu 22 (./configure --otel):

  LD     build/sbin/unitd
cc -Wl,-E  -o build/sbin/unitd -pipe -fPIC -fvisibility=hidden -fno-strict-overflow -funsigned-char -std=gnu11 -O -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fno-strict-aliasing -Wmissing-prototypes -Werror -g    \
	build/src/nxt_main.o  build/lib/libnxt.a \
	-lm -lrt  -lpthread   \
                      \
                    -lpcre2-8 -lssl -lcrypto src/otel/target/release/libotel.a
/usr/bin/ld: src/otel/target/release/libotel.a(reqwest-97d1376dfb77d784.reqwest.cb371ce8e1e3945e-cgu.04.rcgu.o): in function `core::ptr::drop_in_place&lt;alloc::vec::Vec&lt;reqwest::tls::Certificate&gt;&gt;':
reqwest.cb371ce8e1e3945e-cgu.04:(.text._ZN4core3ptr69drop_in_place$LT$alloc..vec..Vec$LT$reqwest..tls..Certificate$GT$$GT$17h9b62679cc7161be5E+0x30): undefined reference to `X509_free'

Fixes: 9d3dcb800 ("otel: add build tooling to include otel code")
[ Tweaked subject prefix. s/NXT_OTEL_LIB_LOC/NXT_OTEL_LIB_STATIC/ - Andrew ]
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The static library is supposed to be specified prior to its
dependencies.
Also, no need to put an otel static library inside libnxt static
library, as we explicitely link unit binary with otel static library
anyway.

This fixes the following build problems:

- macOS:

      Finished `release` profile [optimized] target(s) in 58.07s
    AR     build/lib/libnxt.a
    LD     build/sbin/unitd
  ld: archive member 'libotel.a' not a mach-o file in '/private/tmp/unit-20241219-8965-yb46xp/build/lib/libnxt.a'
  clang: error: linker command failed with exit code 1 (use -v to see invocation)

- Ubuntu 22 (./configure --otel):

  LD     build/sbin/unitd
cc -Wl,-E  -o build/sbin/unitd -pipe -fPIC -fvisibility=hidden -fno-strict-overflow -funsigned-char -std=gnu11 -O -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fno-strict-aliasing -Wmissing-prototypes -Werror -g    \
	build/src/nxt_main.o  build/lib/libnxt.a \
	-lm -lrt  -lpthread   \
                      \
                    -lpcre2-8 -lssl -lcrypto src/otel/target/release/libotel.a
/usr/bin/ld: src/otel/target/release/libotel.a(reqwest-97d1376dfb77d784.reqwest.cb371ce8e1e3945e-cgu.04.rcgu.o): in function `core::ptr::drop_in_place&lt;alloc::vec::Vec&lt;reqwest::tls::Certificate&gt;&gt;':
reqwest.cb371ce8e1e3945e-cgu.04:(.text._ZN4core3ptr69drop_in_place$LT$alloc..vec..Vec$LT$reqwest..tls..Certificate$GT$$GT$17h9b62679cc7161be5E+0x30): undefined reference to `X509_free'

Fixes: 9d3dcb800 ("otel: add build tooling to include otel code")
[ Tweaked subject prefix. s/NXT_OTEL_LIB_LOC/NXT_OTEL_LIB_STATIC/ - Andrew ]
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>auto/make: s/NXT_OTEL_LIB_LOC/NXT_OTEL_LIB_STATIC/</title>
<updated>2025-01-10T04:16:09+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2025-01-06T17:47:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=b9232c75609db9f4ef5adddf366dc7bb894112f6'/>
<id>b9232c75609db9f4ef5adddf366dc7bb894112f6</id>
<content type='text'>
This better matches existing naming convention, e.g NXT_LIB_STATIC

Fixes: 9d3dcb800 ("otel: add build tooling to include otel code")
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This better matches existing naming convention, e.g NXT_LIB_STATIC

Fixes: 9d3dcb800 ("otel: add build tooling to include otel code")
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>otel: add build tooling to include otel code</title>
<updated>2024-11-12T17:50:02+00:00</updated>
<author>
<name>Ava Hahn</name>
<email>a.hahn@f5.com</email>
</author>
<published>2024-11-07T22:14:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=9d3dcb800aba0c036b032ccd00197712c3f5d0d9'/>
<id>9d3dcb800aba0c036b032ccd00197712c3f5d0d9</id>
<content type='text'>
Adds the --otel flag to the configure command and the various build time
variables and checks that are needed in this flow.

It also includes the nxt_otel.c and nxt_otel.h files that are needed for
the rest of Unit to talk to the compiled static library that's generated
from the rust crate.

Signed-off-by: Ava Hahn &lt;a.hahn@f5.com&gt;
Co-authored-by: Gabor Javorszky &lt;g.javorszky@f5.com&gt;
Signed-off-by: Gabor Javorszky &lt;g.javorszky@f5.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds the --otel flag to the configure command and the various build time
variables and checks that are needed in this flow.

It also includes the nxt_otel.c and nxt_otel.h files that are needed for
the rest of Unit to talk to the compiled static library that's generated
from the rust crate.

Signed-off-by: Ava Hahn &lt;a.hahn@f5.com&gt;
Co-authored-by: Gabor Javorszky &lt;g.javorszky@f5.com&gt;
Signed-off-by: Gabor Javorszky &lt;g.javorszky@f5.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>auto: Don't install $runstatedir</title>
<updated>2024-06-18T20:59:45+00:00</updated>
<author>
<name>Alejandro Colomar</name>
<email>alx@kernel.org</email>
</author>
<published>2024-04-22T18:59:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=2e2e5d1e8e862c5d55cda0035eef90c5b6596112'/>
<id>2e2e5d1e8e862c5d55cda0035eef90c5b6596112</id>
<content type='text'>
This directory should exist already in the system, and if not, it should
(and will) be created at run time, not at install time.

It triggered a warning in Alpine Linux's packaging system:

    ERROR: unit*: Packages must not put anything under /var/run

Fixes: 5a37171f733f ("Added default values for pathnames.")
Fixes: 57fc9201cb91 ("Socket: Created control socket &amp; pid file directories.")
Closes: &lt;https://github.com/nginx/unit/issues/742&gt;
Reported-by: Andy Postnikov &lt;apostnikov@gmail.com&gt;
Tested-by: Andy Postnikov &lt;apostnikov@gmail.com&gt;
Tested-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Reviewed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Cc: Liam Crilly &lt;liam@nginx.com&gt;
Cc: Konstantin Pavlov &lt;thresh@nginx.com&gt;
Signed-off-by: Alejandro Colomar &lt;alx@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This directory should exist already in the system, and if not, it should
(and will) be created at run time, not at install time.

It triggered a warning in Alpine Linux's packaging system:

    ERROR: unit*: Packages must not put anything under /var/run

Fixes: 5a37171f733f ("Added default values for pathnames.")
Fixes: 57fc9201cb91 ("Socket: Created control socket &amp; pid file directories.")
Closes: &lt;https://github.com/nginx/unit/issues/742&gt;
Reported-by: Andy Postnikov &lt;apostnikov@gmail.com&gt;
Tested-by: Andy Postnikov &lt;apostnikov@gmail.com&gt;
Tested-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Reviewed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Cc: Liam Crilly &lt;liam@nginx.com&gt;
Cc: Konstantin Pavlov &lt;thresh@nginx.com&gt;
Signed-off-by: Alejandro Colomar &lt;alx@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fuzzing: add fuzzing infrastructure in build system</title>
<updated>2024-06-14T14:11:38+00:00</updated>
<author>
<name>Arjun</name>
<email>pkillarjun@protonmail.com</email>
</author>
<published>2024-05-25T12:22:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=965fc94e4910da14d13a2f10d997cc720b3f6127'/>
<id>965fc94e4910da14d13a2f10d997cc720b3f6127</id>
<content type='text'>
Signed-off-by: Arjun &lt;pkillarjun@protonmail.com&gt;
Reviewed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Arjun &lt;pkillarjun@protonmail.com&gt;
Reviewed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add an EXTRA_CFLAGS make variable</title>
<updated>2024-03-09T01:40:24+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-03-08T15:05:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=a171b399220b69d4b526769481a089a117265902'/>
<id>a171b399220b69d4b526769481a089a117265902</id>
<content type='text'>
This variable is _appended_ to the main CFLAGS variable and allows
setting extra compiler options at make time. E.g

  $ make EXTRA_CFLAGS="..." ...

Useful for quickly testing various extra warning flags.

Suggested-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Reviewed-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This variable is _appended_ to the main CFLAGS variable and allows
setting extra compiler options at make time. E.g

  $ make EXTRA_CFLAGS="..." ...

Useful for quickly testing various extra warning flags.

Suggested-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Reviewed-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a help target to the root Makefile</title>
<updated>2024-03-09T01:40:24+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-03-05T15:03:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=f55fa70c6935f0fa0ab5964830de83ae44006edb'/>
<id>f55fa70c6935f0fa0ab5964830de83ae44006edb</id>
<content type='text'>
This adds a help target to the Makefile in the repository root that
shows what variables are available to control the make/build behaviour.
It currently looks like

  $ make help
  Variables to control make/build behaviour:

    make V=1 ...           - Enables verbose output
    make D=1 ...           - Enables debug builds (-O0)
    make E=0 ...           - Disables -Werror

    Variables can be combined.

Reviewed-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds a help target to the Makefile in the repository root that
shows what variables are available to control the make/build behaviour.
It currently looks like

  $ make help
  Variables to control make/build behaviour:

    make V=1 ...           - Enables verbose output
    make D=1 ...           - Enables debug builds (-O0)
    make E=0 ...           - Disables -Werror

    Variables can be combined.

Reviewed-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow to disable -Werror at 'make' time</title>
<updated>2024-03-09T01:40:24+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-03-02T04:49:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=d23812b8f4376ab05af701e07ad16ff7b1d3bbea'/>
<id>d23812b8f4376ab05af701e07ad16ff7b1d3bbea</id>
<content type='text'>
Having -Werror enabled all the time when developing can be a nuisance,
allow to disable it by passing E=0 to make, e.g

  $ make E=0 ...

This will set -Wno-error overriding the previously set -Werror.

Co-developed-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Having -Werror enabled all the time when developing can be a nuisance,
allow to disable it by passing E=0 to make, e.g

  $ make E=0 ...

This will set -Wno-error overriding the previously set -Werror.

Co-developed-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
