Bug 1290056 - static application does not search default library paths
static application does not search default library paths
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
rawhide
All Linux
unspecified Severity high
: ---
: ---
Assigned To: Carlos O'Donell
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-09 10:10 EST by Carlos O'Donell
Modified: 2016-11-24 09:31 EST (History)
8 users (show)

See Also:
Fixed In Version: glibc-2.23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-24 09:31:29 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Sourceware 17250 None None None Never

  None (edit)
Description Carlos O'Donell 2015-12-09 10:10:30 EST
I discovered this while building a static Go application like this:

cat >> print-user-home.go <<EOF
package main

import "fmt"
import "os/user"
import "log"

func main() {
    myself, err := user.Current()
    if (err != nil) {
        log.Fatal (err)
    }
    fmt.Println(myself.HomeDir)
}
EOF
go build -ldflags '-extldflags=-static -linkmode=external' print-user-home.go
./print-user-home 
2015/12/09 10:06:06 user: unknown userid 1000

This is because 2.22 defaulted to DF_1_NODEFLIB for the default static main link map. This was corrected later with this patch:

commit 93bad7c97c7047ecaf7664859e2b49c0fe995443
Author: Maciej W. Rozycki <macro@imgtec.com>
Date:   Fri Sep 25 09:37:12 2015 +0100

    [BZ #17250] Fix static dlopen default library search path
    
    Fix a regression introduced with commit 0d23a5c1 [Static dlopen
    correction fallout fixes] that caused the default library search path to
    be ignored for modules loaded with dlopen from static executables.
    
        [BZ #17250]
        * elf/dl-support.c (_dl_main_map): Don't initialize l_flags_1
        member.
Comment 1 Fedora End Of Life 2016-11-24 09:06:10 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 2 Florian Weimer 2016-11-24 09:31:29 EST
Fixed in Fedora 24.

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