[LLVMbugs] [Bug 16530] New: ‘dladdr’ was not declared in this scope

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jul 3 08:01:32 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=16530

            Bug ID: 16530
           Summary: ‘dladdr’ was not declared in this scope
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Support Libraries
          Assignee: unassignedbugs at nondot.org
          Reporter: pashev.igor at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 10814
  --> http://llvm.org/bugs/attachment.cgi?id=10814&action=edit
Proposed patch

autoconf provides a special macro AC_USE_SYSTEM_EXTENSIONS, which results in
-D_GNU_SOURCE on glibc-based systems or -D__EXTENSIONS__ on Solaris-based
systems

Synopsis:

if  g++ -I/home/pashev/build/include -I/home/pashev/build/lib/Support
-I/home/pashev/llvm/include -I/home/pashev/llvm/lib/Support  -D_DEBUG -include
llvm/Su
pport/Solaris.h -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS -O3 -fomit-frame-pointer -fvisibility-inlines-hidden -fn
o-exceptions -fno-rtti -fPIC -Woverloaded-virtual -Wcast-qual    -Wall -W
-Wno-unused-parameter -Wwrite-strings -Wno-uninitialized
-Wno-missing-field-initia
lizers -c -MMD -MP -MF
"/home/pashev/build/lib/Support/Release+Asserts/Path.d.tmp" -MT
"/home/pashev/build/lib/Support/Release+Asserts/Path.o" -MT "/home/pa
shev/build/lib/Support/Release+Asserts/Path.d"
/home/pashev/llvm/lib/Support/Path.cpp -o
/home/pashev/build/lib/Support/Release+Asserts/Path.o ; \
        then /usr/bin/mv -f
"/home/pashev/build/lib/Support/Release+Asserts/Path.d.tmp"
"/home/pashev/build/lib/Support/Release+Asserts/Path.d"; else /usr/b
in/rm "/home/pashev/build/lib/Support/Release+Asserts/Path.d.tmp"; exit 1; fi
In file included from /home/pashev/llvm/lib/Support/Path.cpp:986:0:
/home/pashev/llvm/lib/Support/Unix/Path.inc: In function ‘std::string
llvm::sys::fs::getMainExecutable(const char*, void*)’:
/home/pashev/llvm/lib/Support/Unix/Path.inc:278:3: error: ‘Dl_info’ was not
declared in this scope
/home/pashev/llvm/lib/Support/Unix/Path.inc:278:11: error: expected ‘;’ before
‘DLInfo’
/home/pashev/llvm/lib/Support/Unix/Path.inc:279:31: error: ‘DLInfo’ was not
declared in this scope
/home/pashev/llvm/lib/Support/Unix/Path.inc:279:37: error: ‘dladdr’ was not
declared in this scope
rm: /home/pashev/build/lib/Support/Release+Asserts/Path.d.tmp: No such file or
directory
gmake[1]: *** [/home/pashev/build/lib/Support/Release+Asserts/Path.o] Error 1


In the example above DLInfo and dladdr() are not exposed on Solaris unless
__EXTENSIONS__ is defined.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130703/5fd8ccb3/attachment.html>


More information about the llvm-bugs mailing list