Bug 1290056 - static application does not search default library paths
Summary: static application does not search default library paths
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: rawhide
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Carlos O'Donell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-09 15:10 UTC by Carlos O'Donell
Modified: 2016-11-24 14:31 UTC (History)
8 users (show)

Fixed In Version: glibc-2.23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-24 14:31:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Sourceware 17250 0 None None None Never

Description Carlos O'Donell 2015-12-09 15:10:30 UTC
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>
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 14:06:10 UTC
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 14:31:29 UTC
Fixed in Fedora 24.


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