-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
systemd build broken by #5065 #5113
Comments
jon@bionic:~/src$ git clone https://github.com/jon-turney/meson-corpus-test-update
[...]
jon@bionic:~/src$ cd meson-corpus-test-update/
jon@bionic:~/src/meson-corpus-test-update$ ./run systemd
[...]
[584/1778] Linking target libnss_myhostname.so.2.
FAILED: libnss_myhostname.so.2
cc -o libnss_myhostname.so.2 'nss_myhostname@sha/src_nss-myhostname_nss-myhostname.c.o' 'nss_myhostname@sha/src_libsystemd_disable-mempool.c.o' -Wl,--no-undefined -Wl,--as-needed -shared -fPIC -Wl,--start-group -Wl,-soname,libnss_myhostname.so.2 -Wl,-z,relro -Wl,-z,now src/libsystemd/libsystemd_static.a src/basic/libbasic.a -Wl,-z,nodelete -shared -Wl,--version-script=/systemd/src/nss-myhostname/nss-myhostname.sym -Wl,--undefined -lrt /usr/lib/i386-linux-gnu/libcap.so /usr/lib/i386-linux-gnu/libselinux.so -lm -Wl,--end-group -pthread '-Wl,-rpath,$ORIGIN/src/libsystemd:$ORIGIN/src/basic' -Wl,-rpath-link,/systemd/_build/src/libsystemd:/systemd/_build/src/basic
src/libsystemd/libsystemd_static.a(sd-daemon_sd-daemon.c.o): In function `sd_is_mq':
/systemd/_build/../src/libsystemd/sd-daemon/sd-daemon.c:411: undefined reference to `mq_getattr'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
jon@bionic:~/src/meson-corpus-test-update$ ./run systemd --commit 5f00c302
[...]
[1777/1778] Installing files.
[...] |
This should probably be tagged for 0.50.1, as #5065 was. |
It may be that this is not a bug in Meson after all. Systemd has this in its build definition files: link_args : ['-Wl,-z,nodelete',
'-shared',
'-Wl,--version-script=' + version_script_arg,
'-Wl,--undefined'], The last one of these is wrong from what I can tell. Ld's man page says the following:
This would imply that it always requires an argument, which this does not pass. Thus it will grab the next argument on the command line as its argument. Before it took one of the many This patch to systemd makes it compile:
Ping @keszybz |
Ld's man page says the following: -u symbol --undefined=symbol Force symbol to be entered in the output file as an undefined symbol. Doing this may, for example, trigger linking of additional modules from standard libraries. -u may be repeated with different option arguments to enter additional undefined symbols. This option is equivalent to the "EXTERN" linker script command. If this option is being used to force additional modules to be pulled into the link, and if it is an error for the symbol to remain undefined, then the option --require-defined should be used instead. This would imply that it always requires an argument, which this does not pass. Thus it will grab the next argument on the command line as its argument. Before it took one of the many -lrt args (presumably) and now it grabs something other random linker argument and things break. [zj: this line was added in the first version of the meson configuration back in 5c23128. AFAICT, this was a mistake. No such flag appeared in Makefile.am at the time.] mesonbuild/meson#5113
Thanks. Closing this. |
Thanks |
Ld's man page says the following: -u symbol --undefined=symbol Force symbol to be entered in the output file as an undefined symbol. Doing this may, for example, trigger linking of additional modules from standard libraries. -u may be repeated with different option arguments to enter additional undefined symbols. This option is equivalent to the "EXTERN" linker script command. If this option is being used to force additional modules to be pulled into the link, and if it is an error for the symbol to remain undefined, then the option --require-defined should be used instead. This would imply that it always requires an argument, which this does not pass. Thus it will grab the next argument on the command line as its argument. Before it took one of the many -lrt args (presumably) and now it grabs something other random linker argument and things break. [zj: this line was added in the first version of the meson configuration back in 5c23128. AFAICT, this was a mistake. No such flag appeared in Makefile.am at the time.] mesonbuild/meson#5113
Ld's man page says the following: -u symbol --undefined=symbol Force symbol to be entered in the output file as an undefined symbol. Doing this may, for example, trigger linking of additional modules from standard libraries. -u may be repeated with different option arguments to enter additional undefined symbols. This option is equivalent to the "EXTERN" linker script command. If this option is being used to force additional modules to be pulled into the link, and if it is an error for the symbol to remain undefined, then the option --require-defined should be used instead. This would imply that it always requires an argument, which this does not pass. Thus it will grab the next argument on the command line as its argument. Before it took one of the many -lrt args (presumably) and now it grabs something other random linker argument and things break. [zj: this line was added in the first version of the meson configuration back in 5c23128. AFAICT, this was a mistake. No such flag appeared in Makefile.am at the time.] mesonbuild/meson#5113 (cherry picked from commit 700805f)
Ld's man page says the following: -u symbol --undefined=symbol Force symbol to be entered in the output file as an undefined symbol. Doing this may, for example, trigger linking of additional modules from standard libraries. -u may be repeated with different option arguments to enter additional undefined symbols. This option is equivalent to the "EXTERN" linker script command. If this option is being used to force additional modules to be pulled into the link, and if it is an error for the symbol to remain undefined, then the option --require-defined should be used instead. This would imply that it always requires an argument, which this does not pass. Thus it will grab the next argument on the command line as its argument. Before it took one of the many -lrt args (presumably) and now it grabs something other random linker argument and things break. [zj: this line was added in the first version of the meson configuration back in 5c23128. AFAICT, this was a mistake. No such flag appeared in Makefile.am at the time.] mesonbuild/meson#5113 (cherry picked from commit 700805f6c546f2adb79059614f3747f7b5474325)
Ld's man page says the following: -u symbol --undefined=symbol Force symbol to be entered in the output file as an undefined symbol. Doing this may, for example, trigger linking of additional modules from standard libraries. -u may be repeated with different option arguments to enter additional undefined symbols. This option is equivalent to the "EXTERN" linker script command. If this option is being used to force additional modules to be pulled into the link, and if it is an error for the symbol to remain undefined, then the option --require-defined should be used instead. This would imply that it always requires an argument, which this does not pass. Thus it will grab the next argument on the command line as its argument. Before it took one of the many -lrt args (presumably) and now it grabs something other random linker argument and things break. [zj: this line was added in the first version of the meson configuration back in 5c23128. AFAICT, this was a mistake. No such flag appeared in Makefile.am at the time.] mesonbuild/meson#5113 (cherry picked from commit 700805f6c546f2adb79059614f3747f7b5474325)
Ld's man page says the following: -u symbol --undefined=symbol Force symbol to be entered in the output file as an undefined symbol. Doing this may, for example, trigger linking of additional modules from standard libraries. -u may be repeated with different option arguments to enter additional undefined symbols. This option is equivalent to the "EXTERN" linker script command. If this option is being used to force additional modules to be pulled into the link, and if it is an error for the symbol to remain undefined, then the option --require-defined should be used instead. This would imply that it always requires an argument, which this does not pass. Thus it will grab the next argument on the command line as its argument. Before it took one of the many -lrt args (presumably) and now it grabs something other random linker argument and things break. [zj: this line was added in the first version of the meson configuration back in 5c23128daba7236a6080383b2a5649033cfef85c. AFAICT, this was a mistake. No such flag appeared in Makefile.am at the time.] mesonbuild/meson#5113 (cherry picked from commit 700805f6c546f2adb79059614f3747f7b5474325)
Ld's man page says the following: -u symbol --undefined=symbol Force symbol to be entered in the output file as an undefined symbol. Doing this may, for example, trigger linking of additional modules from standard libraries. -u may be repeated with different option arguments to enter additional undefined symbols. This option is equivalent to the "EXTERN" linker script command. If this option is being used to force additional modules to be pulled into the link, and if it is an error for the symbol to remain undefined, then the option --require-defined should be used instead. This would imply that it always requires an argument, which this does not pass. Thus it will grab the next argument on the command line as its argument. Before it took one of the many -lrt args (presumably) and now it grabs something other random linker argument and things break. [zj: this line was added in the first version of the meson configuration back in 5c23128. AFAICT, this was a mistake. No such flag appeared in Makefile.am at the time.] mesonbuild/meson#5113
Ld's man page says the following: -u symbol --undefined=symbol Force symbol to be entered in the output file as an undefined symbol. Doing this may, for example, trigger linking of additional modules from standard libraries. -u may be repeated with different option arguments to enter additional undefined symbols. This option is equivalent to the "EXTERN" linker script command. If this option is being used to force additional modules to be pulled into the link, and if it is an error for the symbol to remain undefined, then the option --require-defined should be used instead. This would imply that it always requires an argument, which this does not pass. Thus it will grab the next argument on the command line as its argument. Before it took one of the many -lrt args (presumably) and now it grabs something other random linker argument and things break. [zj: this line was added in the first version of the meson configuration back in 5c23128. AFAICT, this was a mistake. No such flag appeared in Makefile.am at the time.] mesonbuild/meson#5113 (cherry picked from commit 700805f)
Ld's man page says the following: -u symbol --undefined=symbol Force symbol to be entered in the output file as an undefined symbol. Doing this may, for example, trigger linking of additional modules from standard libraries. -u may be repeated with different option arguments to enter additional undefined symbols. This option is equivalent to the "EXTERN" linker script command. If this option is being used to force additional modules to be pulled into the link, and if it is an error for the symbol to remain undefined, then the option --require-defined should be used instead. This would imply that it always requires an argument, which this does not pass. Thus it will grab the next argument on the command line as its argument. Before it took one of the many -lrt args (presumably) and now it grabs something other random linker argument and things break. [zj: this line was added in the first version of the meson configuration back in 5c23128. AFAICT, this was a mistake. No such flag appeared in Makefile.am at the time.] mesonbuild/meson#5113
Ld's man page says the following: -u symbol --undefined=symbol Force symbol to be entered in the output file as an undefined symbol. Doing this may, for example, trigger linking of additional modules from standard libraries. -u may be repeated with different option arguments to enter additional undefined symbols. This option is equivalent to the "EXTERN" linker script command. If this option is being used to force additional modules to be pulled into the link, and if it is an error for the symbol to remain undefined, then the option --require-defined should be used instead. This would imply that it always requires an argument, which this does not pass. Thus it will grab the next argument on the command line as its argument. Before it took one of the many -lrt args (presumably) and now it grabs something other random linker argument and things break. [zj: this line was added in the first version of the meson configuration back in 5c23128daba7236a6080383b2a5649033cfef85c. AFAICT, this was a mistake. No such flag appeared in Makefile.am at the time.] mesonbuild/meson#5113
Ld's man page says the following: -u symbol --undefined=symbol Force symbol to be entered in the output file as an undefined symbol. Doing this may, for example, trigger linking of additional modules from standard libraries. -u may be repeated with different option arguments to enter additional undefined symbols. This option is equivalent to the "EXTERN" linker script command. If this option is being used to force additional modules to be pulled into the link, and if it is an error for the symbol to remain undefined, then the option --require-defined should be used instead. This would imply that it always requires an argument, which this does not pass. Thus it will grab the next argument on the command line as its argument. Before it took one of the many -lrt args (presumably) and now it grabs something other random linker argument and things break. [zj: this line was added in the first version of the meson configuration back in 5c23128daba7236a6080383b2a5649033cfef85c. AFAICT, this was a mistake. No such flag appeared in Makefile.am at the time.] mesonbuild/meson#5113 (cherry picked from commit 700805f6c546f2adb79059614f3747f7b5474325)
Ld's man page says the following: -u symbol --undefined=symbol Force symbol to be entered in the output file as an undefined symbol. Doing this may, for example, trigger linking of additional modules from standard libraries. -u may be repeated with different option arguments to enter additional undefined symbols. This option is equivalent to the "EXTERN" linker script command. If this option is being used to force additional modules to be pulled into the link, and if it is an error for the symbol to remain undefined, then the option --require-defined should be used instead. This would imply that it always requires an argument, which this does not pass. Thus it will grab the next argument on the command line as its argument. Before it took one of the many -lrt args (presumably) and now it grabs something other random linker argument and things break. [zj: this line was added in the first version of the meson configuration back in 5c23128. AFAICT, this was a mistake. No such flag appeared in Makefile.am at the time.] mesonbuild/meson#5113
Ld's man page says the following: -u symbol --undefined=symbol Force symbol to be entered in the output file as an undefined symbol. Doing this may, for example, trigger linking of additional modules from standard libraries. -u may be repeated with different option arguments to enter additional undefined symbols. This option is equivalent to the "EXTERN" linker script command. If this option is being used to force additional modules to be pulled into the link, and if it is an error for the symbol to remain undefined, then the option --require-defined should be used instead. This would imply that it always requires an argument, which this does not pass. Thus it will grab the next argument on the command line as its argument. Before it took one of the many -lrt args (presumably) and now it grabs something other random linker argument and things break. [zj: this line was added in the first version of the meson configuration back in 5c23128. AFAICT, this was a mistake. No such flag appeared in Makefile.am at the time.] mesonbuild/meson#5113 (cherry picked from commit 700805f) Related: CVE-2020-1712
Ld's man page says the following: -u symbol --undefined=symbol Force symbol to be entered in the output file as an undefined symbol. Doing this may, for example, trigger linking of additional modules from standard libraries. -u may be repeated with different option arguments to enter additional undefined symbols. This option is equivalent to the "EXTERN" linker script command. If this option is being used to force additional modules to be pulled into the link, and if it is an error for the symbol to remain undefined, then the option --require-defined should be used instead. This would imply that it always requires an argument, which this does not pass. Thus it will grab the next argument on the command line as its argument. Before it took one of the many -lrt args (presumably) and now it grabs something other random linker argument and things break. [zj: this line was added in the first version of the meson configuration back in 5c23128. AFAICT, this was a mistake. No such flag appeared in Makefile.am at the time.] mesonbuild/meson#5113 (cherry picked from commit 700805f) (cherry picked from commit 0ed1150)
Ld's man page says the following: -u symbol --undefined=symbol Force symbol to be entered in the output file as an undefined symbol. Doing this may, for example, trigger linking of additional modules from standard libraries. -u may be repeated with different option arguments to enter additional undefined symbols. This option is equivalent to the "EXTERN" linker script command. If this option is being used to force additional modules to be pulled into the link, and if it is an error for the symbol to remain undefined, then the option --require-defined should be used instead. This would imply that it always requires an argument, which this does not pass. Thus it will grab the next argument on the command line as its argument. Before it took one of the many -lrt args (presumably) and now it grabs something other random linker argument and things break. [zj: this line was added in the first version of the meson configuration back in 5c23128. AFAICT, this was a mistake. No such flag appeared in Makefile.am at the time.] mesonbuild/meson#5113 (cherry picked from commit 700805f) Related: CVE-2020-1712
Ld's man page says the following: -u symbol --undefined=symbol Force symbol to be entered in the output file as an undefined symbol. Doing this may, for example, trigger linking of additional modules from standard libraries. -u may be repeated with different option arguments to enter additional undefined symbols. This option is equivalent to the "EXTERN" linker script command. If this option is being used to force additional modules to be pulled into the link, and if it is an error for the symbol to remain undefined, then the option --require-defined should be used instead. This would imply that it always requires an argument, which this does not pass. Thus it will grab the next argument on the command line as its argument. Before it took one of the many -lrt args (presumably) and now it grabs something other random linker argument and things break. [zj: this line was added in the first version of the meson configuration back in 5c23128. AFAICT, this was a mistake. No such flag appeared in Makefile.am at the time.] mesonbuild/meson#5113 (cherry picked from commit 700805f) [fbui: adjust context]
Ld's man page says the following: -u symbol --undefined=symbol Force symbol to be entered in the output file as an undefined symbol. Doing this may, for example, trigger linking of additional modules from standard libraries. -u may be repeated with different option arguments to enter additional undefined symbols. This option is equivalent to the "EXTERN" linker script command. If this option is being used to force additional modules to be pulled into the link, and if it is an error for the symbol to remain undefined, then the option --require-defined should be used instead. This would imply that it always requires an argument, which this does not pass. Thus it will grab the next argument on the command line as its argument. Before it took one of the many -lrt args (presumably) and now it grabs something other random linker argument and things break. [zj: this line was added in the first version of the meson configuration back in 5c23128daba7236a6080383b2a5649033cfef85c. AFAICT, this was a mistake. No such flag appeared in Makefile.am at the time.] mesonbuild/meson#5113 (cherry picked from commit 700805f6c546f2adb79059614f3747f7b5474325)
See https://travis-ci.org/jon-turney/meson-corpus-test/jobs/508033325#L1596
Bisecting meson lands on commit 07818da
I think this may be related somehow to
-lrt
being de-duplicated in a linking command line?The text was updated successfully, but these errors were encountered: