Opened 2 months ago

Closed 2 months ago

#31922 closed defect (implemented)

Recommend pkg-config when systemd fails

Reported by: teor Owned by: teor
Priority: Medium Milestone: Tor: 0.4.2.x-final
Component: Core Tor/Tor Version: Tor: 0.3.1.1-alpha
Severity: Normal Keywords: 042-should, doc
Cc: Actual Points: 0.3
Parent ID: #28993 Points: 0.3
Reviewer: ahf Sponsor:

Description (last modified by teor)

We used to show an error like this when configure failed to find systemd:

configure: error: Package requirements (systemd >= 209) were not met:
No package 'systemd' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.
Alternatively, you may set the environment variables SYSTEMD209_CFLAGS and SYSTEMD209_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.

But now we don't:

checking for pkg-config... no
checking for SYSTEMD... no
configure: Okay, checking for systemd a different way...
checking for SYSTEMD... no
configure: error: Explicitly requested systemd support, but systemd not found

This issue also affects lzma, and any other package that requires pkg-config.

In fact, lzma silently fails:

./configure --enable-lzma silently fails if pkg-config is not installed:

https://gitlab.com/eighthave/tor/pipelines/85811623

Child Tickets

Change History (10)

comment:1 Changed 2 months ago by teor

Component: Community/RelaysCore Tor/Tor

comment:2 Changed 2 months ago by teor

Owner: changed from Nusenu to teor
Status: newassigned

comment:3 Changed 2 months ago by teor

Summary: Recommend systemdRecommend pkg-config when systemd fails

comment:4 Changed 2 months ago by nickm

I suggest that we procede with caution if there is a stability risk. This is a regression, but it is not a regression in 0.4.2 but rather in (I think) some earlier version. As such, I believe it might be better to target the fix for 0.4.3 if it looks the least bit tricky: autoconf and linker changes have a way of seeming to work for everybody until a while after the release is actually out.

Of course, if the fix is simple and obvious, we can go ahead and take it now.

comment:5 Changed 2 months ago by ggus

Cc: nusenu ggus removed

comment:6 Changed 2 months ago by teor

Description: modified (diff)

comment:7 in reply to:  4 Changed 2 months ago by teor

Actual Points: 0.3
Keywords: regression removed
Points: 0.3
Status: assignedneeds_review
Version: Tor: 0.4.0.1-alphaTor: 0.3.1.1-alpha

Replying to nickm:

I suggest that we procede with caution if there is a stability risk. This is a regression, but it is not a regression in 0.4.2 but rather in (I think) some earlier version. As such, I believe it might be better to target the fix for 0.4.3 if it looks the least bit tricky: autoconf and linker changes have a way of seeming to work for everybody until a while after the release is actually out.

Of course, if the fix is simple and obvious, we can go ahead and take it now.

This PR improves the configure log messages when:

  • pkg-config is not installed, or
  • any of the libraries we check using pkg-config is not present.

It's a log-only change, it does not change the behaviour of configure:

The root cause of this issue is that we replace the PKG_CHECK_MODULES error message with a variable assignment. So PKG_CHECK_MODULES doesn't exit on error (which is sometimes what we want).

It also doesn't log a message describing how to install or configure pkg-config, or the replacement env vars that the user can set. But some users would like this information.

comment:8 Changed 2 months ago by dgoulet

Reviewer: ahf

comment:9 Changed 2 months ago by ahf

Status: needs_reviewmerge_ready

Looks good to me.

comment:10 Changed 2 months ago by nickm

Resolution: implemented
Status: merge_readyclosed

Merged!

Note: See TracTickets for help on using tickets.