[llvm-bugs] [Bug 40481] New: lld: cannot link library by passing absolute path

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jan 26 13:15:14 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=40481

            Bug ID: 40481
           Summary: lld: cannot link library by passing absolute path
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mail at milianw.de
                CC: llvm-bugs at lists.llvm.org, peter.smith at linaro.org

$ cat test.cpp
#include <QCoreApplication>
#include <QTimer>

int main(int argc, char** argv)
{
    QCoreApplication app(argc, argv);
    QTimer::singleShot(1000, [&app](){ app.quit(); });
    return app.exec();
}

$ ld --version
GNU gold (GNU Binutils 2.31.1) 1.16
...

$ g++ -g -O0 -I/usr/include/qt -I/usr/include/qt/QtCore -fPIC
-l/usr/lib/libQt5Core.so test.cpp
# this works just fine

# now I change my ld symlink and retry with ld:

$ ld --version
LLD 7.0.1 (compatible with GNU linkers)

$ g++ -g -O0 -I/usr/include/qt -I/usr/include/qt/QtCore -fPIC
-l/usr/lib/libQt5Core.so test.cpp
ld: error: unable to find library -l/usr/lib/libQt5Core.so
collect2: error: ld returned 1 exit status

-- 
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/20190126/73a33659/attachment.html>


More information about the llvm-bugs mailing list