Skip to content

Fix dependency on systemd#1

Merged
keithbusch merged 1 commit intolinux-nvme:masterfrom
safl:master
Feb 26, 2020
Merged

Fix dependency on systemd#1
keithbusch merged 1 commit intolinux-nvme:masterfrom
safl:master

Conversation

@safl
Copy link
Copy Markdown
Contributor

@safl safl commented Feb 26, 2020

When libsystemd is not installed on the system, then the pkg-config
check would still be true when systemd itself is on the system. Also,
when the library is unavailable then the hard-coded "-lsystemd" would
cause the build to fail. The following changes fix that.

  • configure: changed check from "systemd" to the library "libsystemd"

  • examples/Makefile: Replaced hard-coded "-lsystemd" with "${LDFLAGS}"
    as defined by "config-host.mak" in examples/Makefile

  • src/Makefile: added include of "config-host.mak", removed hard-coded
    "-lsystemd", "-lsystemd" will trickle in from LDFLAGS

Signed-off-by: Simon A. F. Lund simon.lund@samsung.com

Test

On my laptop (DebianBuster), it:

  • Now builds with and without libsystemd
  • ./test/test ran without error both with and without libsystemd

When libsystemd is not installed on the system, then the pkg-config
check would still be true when systemd itself is on the system. Also,
when the library is unavailable then the hard-coded "-lsystemd" would
cause the build to fail. The following changes fix that.

* configure: changed check from "systemd" to the library "libsystemd"

* examples/Makefile: Replaced hard-coded "-lsystemd" with "${LDFLAGS}"
  as defined by "config-host.mak" in examples/Makefile

* src/Makefile: added include of "config-host.mak", removed hard-coded
  "-lsystemd", "-lsystemd" will trickle in from LDFLAGS

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
@keithbusch keithbusch merged commit 6701d97 into linux-nvme:master Feb 26, 2020
@keithbusch
Copy link
Copy Markdown
Contributor

Thanks for the catch!

martin-gpy added a commit to martin-gpy/libnvme that referenced this pull request Jan 21, 2023
White spaces are currently not trimmed while parsing the traddr
and trsvcid discovery log page entries in the python bindings
file, unlike at other places in libnvme/nvme-cli. This causes
invalid IP addresses to show up for overlying utilities such as
nvme-stas resulting in connection errors as shown below:

stacd[3669]: Stac._config_ctrls_finish()        - discovered_ctrl_list = [{'transport': 'rdma',
'traddr': '192.168.3.101                                             \x01\x04\x01',
'trsvcid': '4420', 'host-traddr': '', 'host-iface': '',
'subsysnqn': 'nqn.1992-08.com.netapp:sn.f2f8dc578de611ed9d5a00a098fd5d4f:subsystem.s1'}

stacd[3669]: (rdma, 192.168.3.101                                    linux-nvme#1#004#001, 4420,
nqn.1992-08.com.netapp:sn.f2f8dc578de611ed9d5a00a098fd5d4f:subsystem.s1) IP address is not valid

Fix this by appropriately trimming these log entries in the
bindings file.

Signed-off-by: Martin George <marting@netapp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants