Bug 1543490 - brltty: Incomplete injection of Fedora build flags
Summary: brltty: Incomplete injection of Fedora build flags
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: brltty
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: Reopened
Depends On:
Blocks: Fedora28BuildFlags
TreeView+ depends on / blocked
 
Reported: 2018-02-08 14:52 UTC by Florian Weimer
Modified: 2018-05-26 20:42 UTC (History)
3 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2018-05-26 20:42:56 UTC


Attachments (Terms of Use)

Description Florian Weimer 2018-02-08 14:52:18 UTC
When building /usr/lib64/ocaml/stublibs/dllbrlapi_stubs.so, the Fedora build flags were not applied correctly.  At least the linker flags (LDFLAGS) are missing.  You need to pass $RPM_LD_FLAGS (or equivalent) down to the linker invocation.

See https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/master/f/buildflags.md for information on RPM macros and environment variables provided by the build environment.

Comment 1 Gwyn Ciesla 2018-02-08 17:55:51 UTC
I'm not sure how to ensure that if OCaml.

Comment 2 Florian Weimer 2018-02-09 17:29:50 UTC
It turns out that /usr/lib64/brltty/libbrlapi_java.so, /usr/lib64/brltty/libbrlttyxsc.so, /usr/lib64/libbrlapi.so.0.6.7, /usr/lib64/tcl8.6/brlapi-0.6.7/libbrlapi_tcl.so and many others are not linked with BIND_NOW, so the LDFLAGS injection issue affects more than just the Ocaml extension.

Comment 3 Gwyn Ciesla 2018-02-12 22:32:47 UTC
Please check 5.2-2 in rawhide. I think I fixed it. If not let me know.

Comment 4 Fedora End Of Life 2018-02-20 15:37:56 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 5 Florian Weimer 2018-02-21 12:41:59 UTC
Still not fixed:

# rpm -qf /usr/lib64/brltty/libbrlttybbg.so
brltty-5.6-2.fc28.x86_64

# readelf -d /usr/lib64/brltty/libbrlttybbg.so
Dynamic section at offset 0x2df8 contains 24 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000c (INIT)               0x1078
 0x000000000000000d (FINI)               0x1b50
 0x0000000000000019 (INIT_ARRAY)         0x202b90
 0x000000000000001b (INIT_ARRAYSZ)       8 (bytes)
 0x000000000000001a (FINI_ARRAY)         0x202b98
 0x000000000000001c (FINI_ARRAYSZ)       8 (bytes)
 0x000000006ffffef5 (GNU_HASH)           0x228
 0x0000000000000005 (STRTAB)             0x690
 0x0000000000000006 (SYMTAB)             0x270
 0x000000000000000a (STRSZ)              603 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000003 (PLTGOT)             0x203000
 0x0000000000000002 (PLTRELSZ)           720 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0xda8
 0x0000000000000007 (RELA)               0x988
 0x0000000000000008 (RELASZ)             1056 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x948
 0x000000006fffffff (VERNEEDNUM)         1
 0x000000006ffffff0 (VERSYM)             0x8ec
 0x000000006ffffff9 (RELACOUNT)          38
 0x0000000000000000 (NULL)               0x0

NOW/BIND_NOW is still missing (there should be a line with flags).

Comment 6 Jaroslav Škarvada 2018-04-24 15:46:44 UTC
I tried to address it in brltty-5.6-8, feel free to reopen if the problem persists.

Comment 7 Florian Weimer 2018-04-30 08:42:15 UTC
Please also release an update via Fedora 28.  Thanks.

Comment 8 Jaroslav Škarvada 2018-04-30 11:07:22 UTC
(In reply to Florian Weimer from comment #7)
> Please also release an update via Fedora 28.  Thanks.

OK, I will do it.

Comment 9 Fedora Update System 2018-04-30 11:25:09 UTC
brltty-5.6-10.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-985d578d7b

Comment 10 Fedora Update System 2018-04-30 19:55:11 UTC
brltty-5.6-10.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-985d578d7b

Comment 11 Fedora Update System 2018-05-02 10:53:01 UTC
brltty-5.6-10.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Florian Weimer 2018-05-07 15:54:27 UTC
Sorry, it turns out that the build flags coverage is still incomplete:

/usr/lib64/libbrlapi.so.0.6.7 has not been linked with full RELRO:

gcc -shared -Wl,-soname,libbrlapi.so.0.6 -o libbrlapi.so brlapi_client.o -lpthread 

So there's no LDFLAGS injection at all.

Samething for /usr/lib64/brltty/libbrlapi_java.so:

gcc -shared -Wl,-soname,brlapi -o libbrlapi_java.so bindings.o -L./../../Programs -lbrlapi

And /usr/lib64/tcl8.6/brlapi-0.6.7/libbrlapi_tcl.so:

gcc -shared -Wl,-soname,brlapi -o libbrlapi_tcl.so bindings.o -L/usr/lib64 -ltcl8.6 -L./../../Programs -lbrlapi

/usr/lib64/ocaml/stublibs/dllbrlapi_stubs.so is affected as well but may be more difficult to fix because the linker invocation happens within Ocaml.

Comment 13 Fedora Update System 2018-05-21 20:13:27 UTC
brltty-5.6-11.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-ace78e1472

Comment 14 Fedora Update System 2018-05-22 16:01:22 UTC
brltty-5.6-12.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-8a0d5b35fe

Comment 15 Fedora Update System 2018-05-22 19:38:34 UTC
brltty-5.6-11.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-ace78e1472

Comment 16 Fedora Update System 2018-05-23 17:37:21 UTC
brltty-5.6-12.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-8a0d5b35fe

Comment 17 Fedora Update System 2018-05-26 20:42:56 UTC
brltty-5.6-12.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.