bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/22601] New: "skipping incompatible" - can this be more specific?


From: jg at jguk dot org
Subject: [Bug ld/22601] New: "skipping incompatible" - can this be more specific?
Date: Thu, 14 Dec 2017 10:37:47 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=22601

            Bug ID: 22601
           Summary: "skipping incompatible" - can this be more specific?
           Product: binutils
           Version: 2.26
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: jg at jguk dot org
  Target Milestone: ---

Could the linker output a clearer message?

Expected:


$ g++ -O2 -Wall -Wextra -Wpedantic -m32 -o main main.cpp
/usr/bin/ld: skipping incompatible x68_64
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.so when searching for x86 -lstdc++
/usr/bin/ld: skipping incompatible x68_64
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a when searching for x86 -lstdc++
/usr/bin/ld: cannot find x86 -lstdc++
collect2: error: ld returned 1 exit status


Actual:

$ g++ -O2 -Wall -Wextra -Wpedantic -m32 -o main main.cpp
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.so
when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a
when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
collect2: error: ld returned 1 exit status



//g++ -O2 -Wall -Wextra -Wpedantic -m32 -o main main.cpp

#include <stdio.h>
#include <dirent.h>
#include <sys/types.h>
#include <errno.h>
#include <string.h>

int main (void)
{
    DIR * dir = opendir("myfile.txt");
    if(NULL == dir)
    {
        int err = errno;
        printf("%d: %s\n", err, strerror(err));
    }

    printf("%p\n", (void*)dir);

    return 0;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]