bug-gnu-libiconv
[Top][All Lists]
Advanced

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

Re: [bug-gnu-libiconv] The configure script is using wrong parameter -Wl


From: Fx Ne
Subject: Re: [bug-gnu-libiconv] The configure script is using wrong parameter -Wl for msvc complier
Date: Fri, 21 Jun 2024 13:22:06 +0800

Complier stop at linking some file?
  正在创建库 .libs\charset.dll.lib 和对象 .libs\charset.dll.exp
//After the complier generated two files above then it stops.
libtool: link:  linknames=
libtool: link: false cr .libs/charset.lib  localcharset.obj relocatable-stub.obj
//Then it leaves directory.
//The file charset.lib don't exist, but there is a charset.dll.lib. Is this the problem?

I think it failed on section of 'make libcharset.la', Don't know why, It don't give me detailed information.
Log of make libcharset.lahttps://pastebin.com/raw/bAXSLd6z



Fx Ne <kxmpex@gmail.com> 于2024年6月21日周五 10:27写道:
I find that on shell I must set the environment of msvc as cmd style , rather than linux style.
I used below parameter and complie stop again
./configure --host=x86_64-w64-mingw32 --prefix=/f/Software/Application/lib/libiconv \
            CC="$(pwd)/build-aux/compile cl -nologo" \
            CFLAGS="-MD" \
            CXX="$(pwd)/build-aux/compile cl -nologo" \
            CXXFLAGS="-MD" \
            LD="$ld" \
            NM="dumpbin -symbols" \
            STRIP=":" \
            AR="$(pwd)/build-aux/ar-lib lib" \
            RANLIB=":"

......
libtool: link:  /f/Software/Application/lib/libiconv-1.17/build-aux/compile cl -nologo -o .libs\\charset-1.dll  .libs/localcharset.obj .libs/relocatable-stub.obj      "@.libs\\charset-1.dll.exp" -Wl,-DLL,-IMPLIB:".libs\\charset.dll.lib"
  正在创建库 .libs\charset.dll.lib 和对象 .libs\charset.dll.exp
libtool: link:  linknames=
libtool: link: false cr .libs/charset.lib  localcharset.obj relocatable-stub.obj
make[2]: *** [Makefile:55: libcharset.la] Error 1
make[2]: Leaving directory '/f/Software/Application/lib/libiconv-1.17/libcharset/lib'
make[1]: *** [Makefile:34: all] Error 2
make[1]: Leaving directory '/f/Software/Application/lib/libiconv-1.17/libcharset'
make: *** [Makefile:41: lib/localcharset.h] Error 2


--------------------------------------------------------------------------------
The dll and lib is generated, it looks better now. But what is the current error!??
does error caused by libcharset.la!??

That line 55 is 
 $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) -o libcharset.la -rpath $(libdir) -version-info $(LIBCHARSET_VERSION_INFO) -no-undefined $(OBJECTS)

libcharset/Makefile line 34 is " cd lib && $(MAKE) all"
line 41 is "$(INSTALL_DATA) include/libcharset.h.inst $(includedir)/libcharset.h"

# find libcharset/lib
libcharset/lib
libcharset/lib/.libs
libcharset/lib/.libs/charset-1.dll
libcharset/lib/.libs/charset-1.dll.exp
libcharset/lib/.libs/charset.dll.exp
libcharset/lib/.libs/charset.dll.lib
libcharset/lib/.libs/charset.exp
libcharset/lib/.libs/localcharset.obj
libcharset/lib/.libs/relocatable-stub.obj
libcharset/lib/ChangeLog
libcharset/lib/localcharset.c
libcharset/lib/localcharset.lo
libcharset/lib/localcharset.obj
libcharset/lib/Makefile
libcharset/lib/Makefile.in
libcharset/lib/relocatable-stub.c
libcharset/lib/relocatable-stub.lo
libcharset/lib/relocatable-stub.obj

----------------------------------------------------------------------


Bruno Haible <bruno@clisp.org> 于2024年6月21日周五 05:07写道:
Fx Ne wrote:
> *Using -Wl will cause error and stop the complier.*
> For msvc the WL is for detailed error info , not for enter options.

You need to follow the instructions from the INSTALL.windows file.

> It look like caused the command in below is invalid
> dumpbin -symbols -headers  .libs/localcharset.obj

You need to follow the instructions from the INSTALL.windows file.

> *on msys*

You need to follow the instructions from the INSTALL.windows file.

> When using msvc, you can just use cl.exe /I include_dir $input.lib
> $input.c  /link $linkopts /libpath:$libs /out:$name.dll

You need to follow the instructions from the INSTALL.windows file.

> The -o for msvc should updated to /out:$name

You need to follow the instructions from the INSTALL.windows file.

Bruno




reply via email to

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