<feed xmlns='http://www.w3.org/2005/Atom'>
<title>unit.git/auto, branch 1.34</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-10T16:33:06+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=0b39cba007c0f1f262597ed264a45fa7a375ddca'/>
<id>0b39cba007c0f1f262597ed264a45fa7a375ddca</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/otel: don't look for OpenSSL on Darwin</title>
<updated>2025-01-10T16:33:06+00:00</updated>
<author>
<name>Konstantin Pavlov</name>
<email>thresh@nginx.com</email>
</author>
<published>2024-12-20T00:09:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=035b523af06815c5d23c63701cf85c9c931d2c0a'/>
<id>035b523af06815c5d23c63701cf85c9c931d2c0a</id>
<content type='text'>
Rust code relies on macOS-provided frameworks for TLS.

Fixes: 9d3dcb800 ("otel: add build tooling to include otel code")
[ Tweaked subject prefix. Some minor tweaks for current changes. -
  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>
Rust code relies on macOS-provided frameworks for TLS.

Fixes: 9d3dcb800 ("otel: add build tooling to include otel code")
[ Tweaked subject prefix. Some minor tweaks for current changes. -
  Andrew ]
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-10T16:33:06+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=f1cf5fe010012d0a173c95bc1ff0e622594c68d3'/>
<id>f1cf5fe010012d0a173c95bc1ff0e622594c68d3</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-10T16:33:06+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=92c0d3488c059e375708664d6bc618245ffdd948'/>
<id>92c0d3488c059e375708664d6bc618245ffdd948</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-10T16:33:06+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=1175e4048918acadd7a6f629537ec92c1919732d'/>
<id>1175e4048918acadd7a6f629537ec92c1919732d</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>auto/otel: Make use of nxt_feature_name</title>
<updated>2025-01-10T16:33:06+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-12-19T23:51:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=8803a2bce616bc22f3b67c05459d011e0264aa13'/>
<id>8803a2bce616bc22f3b67c05459d011e0264aa13</id>
<content type='text'>
When building with --otel on macOS for example I was seeing compile
failures with the cpu_set_t stuff which should only be used under Linux.

It turned out that despite

  checking for Linux sched_getaffinity() ... not found

we were getting

  #ifndef NXT_HAVE_LINUX_SCHED_GETAFFINITY
  #define NXT_HAVE_LINUX_SCHED_GETAFFINITY  1
  #endif

in build/include/nxt_auto_config.h

It seems this was due to the

    . auto/feature

in auto/otel, this check happens right after the above. Without having

    nxt_feature_name=NXT_HAVE_OTEL

set.

Instead we were adding the define for that manually.

Doing auto/feature without having a nxt_feature_name must have used the
last set one and enabled it.

Set nxt_feature_name and remove the manual editing of nxt_auto_config.h

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>
When building with --otel on macOS for example I was seeing compile
failures with the cpu_set_t stuff which should only be used under Linux.

It turned out that despite

  checking for Linux sched_getaffinity() ... not found

we were getting

  #ifndef NXT_HAVE_LINUX_SCHED_GETAFFINITY
  #define NXT_HAVE_LINUX_SCHED_GETAFFINITY  1
  #endif

in build/include/nxt_auto_config.h

It seems this was due to the

    . auto/feature

in auto/otel, this check happens right after the above. Without having

    nxt_feature_name=NXT_HAVE_OTEL

set.

Instead we were adding the define for that manually.

Doing auto/feature without having a nxt_feature_name must have used the
last set one and enabled it.

Set nxt_feature_name and remove the manual editing of nxt_auto_config.h

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>auto/otel: Remove pkg-config check</title>
<updated>2024-12-13T17:22:01+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-12-13T17:06:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=ae20ab0a3b2b90b471e868905dd44d7b75501fd0'/>
<id>ae20ab0a3b2b90b471e868905dd44d7b75501fd0</id>
<content type='text'>
@thresheek reported an issue trying to configure OTEL support on Amazon
Linux 2

  checking for OTEL requirements:
    - checking for rust compiler ... found
    - checking for cargo ... found
    - checking for OpenSSL library ... found
  Package openssl was not found in the pkg-config search path.
  Perhaps you should add the directory containing `openssl.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'openssl' found

We successfully built the test program with '-lssl -lcrypto', but then
tried to use 'pkg-config openssl --cflags --libs' to override
NXT_OTEL_LIBS.

On Amazon Linux2 there is no openssl.pc, they have a openssl11.pc.

Let's just remove the pkg-config check, if we get here, we have
successfully built with '-lssl -lcrypto', so just go with that (it also
matches what we do in auto/ssltls).

Reported-by: Konstantin Pavlov &lt;thresh@nginx.com&gt;
Closes: https://github.com/nginx/unit/issues/1510
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
@thresheek reported an issue trying to configure OTEL support on Amazon
Linux 2

  checking for OTEL requirements:
    - checking for rust compiler ... found
    - checking for cargo ... found
    - checking for OpenSSL library ... found
  Package openssl was not found in the pkg-config search path.
  Perhaps you should add the directory containing `openssl.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'openssl' found

We successfully built the test program with '-lssl -lcrypto', but then
tried to use 'pkg-config openssl --cflags --libs' to override
NXT_OTEL_LIBS.

On Amazon Linux2 there is no openssl.pc, they have a openssl11.pc.

Let's just remove the pkg-config check, if we get here, we have
successfully built with '-lssl -lcrypto', so just go with that (it also
matches what we do in auto/ssltls).

Reported-by: Konstantin Pavlov &lt;thresh@nginx.com&gt;
Closes: https://github.com/nginx/unit/issues/1510
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>java: update third-party components to their recent versions</title>
<updated>2024-12-09T15:12:47+00:00</updated>
<author>
<name>Sergey A. Osokin</name>
<email>osa@FreeBSD.org.ru</email>
</author>
<published>2024-12-09T15:12:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=d71ea64cecbaa4dc937fa716a7ebed2ec01447d7'/>
<id>d71ea64cecbaa4dc937fa716a7ebed2ec01447d7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</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>java: Update third-party components to their recent versions</title>
<updated>2024-11-12T01:05:37+00:00</updated>
<author>
<name>Sergey A. Osokin</name>
<email>osa@FreeBSD.org.ru</email>
</author>
<published>2024-11-09T17:34:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=0391a3ca68017fbc0d862b2d6000e3fd8980e71e'/>
<id>0391a3ca68017fbc0d862b2d6000e3fd8980e71e</id>
<content type='text'>
[ Tweaked subject - 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>
[ Tweaked subject - Andrew ]
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
