Bug 338051

Summary: Prelinking a2ps prints a warning
Product: [Fedora] Fedora Reporter: Daniel Qarras <dqarras>
Component: a2psAssignee: Tim Waugh <twaugh>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideKeywords: Reopened
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-25 09:22:29 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 235705    

Description Daniel Qarras 2007-10-18 10:39:14 EDT
When prelinking /usr/lib/liba2ps.so.1.0.0 from a2ps-4.13b-69.fc8 a warning is
displayed:

Prelinking /usr/lib/liba2ps.so.1.0.0
prelink: Warning: /usr/lib/liba2ps.so.1 has undefined non-weak symbols
Comment 1 Tim Waugh 2008-02-12 12:54:53 EST
'ldd -d' shows that this is because of 'program_name', but I can't work out how
to fix this.  It doesn't seem to be harmful.
Comment 2 Daniel Qarras 2008-02-16 10:11:17 EST
Well, I agree that this is not fatal but see Jakub's comment in Bug 330821:

This is not an error, just a warning.  There are legitimate cases where having
undefined symbols in
ldd -d -r .../lib*so*
is ok and one of them is if the library is not generally dlopenable, but relies
on the binary to satisfy those symbols.

On the other side, if the symbols are provided by some shared library, usually
it is just an on unintentional omission on the packager's part, which is bad
for multiple reasons:
1) if the symbols are versioned in the library where they are defined, the
   library with undefined non-weak symbols might use wrong versions of those 
   symbols
2) in prelink it causes unnecessary prelink conflicts which need to be resolved
   at runtime
3) if you e.g. dlopen that library and don't know you need the other library
   as well, the dlopen will likely fail

I'm reopening for reconsideration after providing this background info but I
won't protest if you still feel like closing this one.

Thanks.
Comment 3 Tim Waugh 2008-02-25 09:22:29 EST
program_name is indeed meant to be provided by the binary that links to liba2ps.

error.c:
    81  /* The calling program should define program_name and set it to the
    82     name of the executing program.  */
    83  extern char *program_name;

Thanks for the background information.