[Bug binutils/10768] New: dlltool: can't specify machine arch when creating .lib from .def file

View: New views
5 Messages — Rating Filter:   Alert me  

[Bug binutils/10768] New: dlltool: can't specify machine arch when creating .lib from .def file

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm creating an import library for a proprietary DLL using a hand made .def file.

The following command fail:

arm-mingw32ce-dlltool -d libGLES_CM.def -D libGLES_CM.dll -l libGLES_CM.lib -m
$MACHINE

with MACHINE either arm or thumb, it failed with a strange message:

"Can't open .lib file: libGLES_CM.lib."

Using strace, one can see dlltool removing libGLES_CM.lib before failing.

Hopefully, removing -m thumb/arm, dlltool works and produces a .lib that can be
used on my target.

So either -m is not needed here and needed a proper error message/handling, or
this is a bug and i have luck to have a working .lib.

--
           Summary: dlltool: can't specify machine arch when creating .lib
                    from .def file
           Product: binutils
           Version: 2.19
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: yann at droneaud dot fr
                CC: bug-binutils at gnu dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=10768

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug binutils/10768] dlltool: selecting machine arch when creating .lib from .def file failed with unclear error message

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From yann at droneaud dot fr  2009-10-14 12:21 -------
Using gdb help find the problem: when another machine architecture is selected, the bfd target is not the one per default. And the selected bfd is not part of the build.
So there's no bug, but the error message is unclear.

--
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|dlltool: can't specify      |dlltool: selecting machine
                   |machine arch when creating  |arch when creating .lib from
                   |.lib from .def file         |.def file failed with
                   |                            |unclear error message


http://sourceware.org/bugzilla/show_bug.cgi?id=10768

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug binutils/10768] dlltool: selecting machine arch when creating .lib from .def file failed with unclear error message

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From yann at droneaud dot fr  2009-10-14 12:29 -------
Created an attachment (id=4278)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4278&action=view)
dlltool: Improve error reporting regarding BFD open operations

Here's a patch which help to diagnose problem regarding BFD open calls.
Patch against CVS HEAD.


--


http://sourceware.org/bugzilla/show_bug.cgi?id=10768

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug binutils/10768] dlltool: selecting machine arch when creating .lib from .def file failed with unclear error message

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2009-10-16 14:03 -------
Subject: Bug 10768

CVSROOT: /cvs/src
Module name: src
Changes by: nickc@... 2009-10-16 14:02:55

Modified files:
        binutils       : ChangeLog dlltool.c

Log message:
        PR 10768
        * dlltool.c (bfd_get_errmsg): New macro.
        (scan_obj_file): Use it.
        (make_one_lib_file): Use it.
        (make_head): Use it.
        (make_delay_head): Use it.
        (make_tail): Use it.
        (gen_lib_file): Use it.
        (identify_dll_for_implib): Use it.
        (identify_search_archive):  Use it.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/binutils/ChangeLog.diff?cvsroot=src&r1=1.1546&r2=1.1547
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/binutils/dlltool.c.diff?cvsroot=src&r1=1.93&r2=1.94



--


http://sourceware.org/bugzilla/show_bug.cgi?id=10768

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug binutils/10768] dlltool: selecting machine arch when creating .lib from .def file failed with unclear error message

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From nickc at redhat dot com  2009-10-16 14:03 -------
Hi Yann,

  Thanks for the patch.  I have now applied it to the sources along with this
changelog entry.

Cheers
  Nick

binutils/ChangeLog
2009-10-16  Yann Droneaud  <yann@...>

        PR 10768
        * dlltool.c (bfd_get_errmsg): New macro.
        (scan_obj_file): Use it.
        (make_one_lib_file): Use it.
        (make_head): Use it.
        (make_delay_head): Use it.
        (make_tail): Use it.
        (gen_lib_file): Use it.
        (identify_dll_for_implib): Use it.
        (identify_search_archive):  Use it.



--
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=10768

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils