Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => CodeCompletion redesign => Topic started by: ollydbg on September 15, 2010, 01:44:51 am

Title: cc_branch 6594 build faild: no intl library found
Post by: ollydbg on September 15, 2010, 01:44:51 am
Hi, Morten and all.

I have just update the cc_branch to 6594 and build it under TDM 4.5.1-dw2
I found that when building exchndl, there is a build error: intl library is not found.

So, I have to download this library from:
http://gnuwin32.sourceforge.net/packages/libintl.htm

and copy the libintl.dll.a to TDM's lib folder, and copy libintl3.dll to some PATH folder.

Is it the suggested manner I should do?

thanks.

Title: Re: cc_branch 6594 build faild: no intl library found
Post by: MortenMacFly on September 15, 2010, 06:53:43 am
It is as simple as follows (in fact I forgot to mention):

Download the following packages from the official MinGW site:
libintl-0.17-1-mingw32-dll-8.tar.lzma:
http://sourceforge.net/projects/mingw/files/MinGW/gettext/gettext-0.17-1/libintl-0.17-1-mingw32-dll-8.tar.lzma/download

gettext-0.17-1-mingw32-bin.tar.lzma:
http://sourceforge.net/projects/mingw/files/MinGW/gettext/gettext-0.17-1/gettext-0.17-1-mingw32-dev.tar.lzma/download

gettext-0.17-1-mingw32-dev.tar.lzma:
http://sourceforge.net/projects/mingw/files/MinGW/gettext/gettext-0.17-1/gettext-0.17-1-mingw32-bin.tar.lzma/download

...and put it into you regular GCC directory (TDM or alike). This will do it.

There is no need for another (self-compiled) dependency.

Alternatively you can also just deactivate the "exchndl" target (remove it from the virtual target named "All").
Title: Re: cc_branch 6594 build faild: no intl library found
Post by: Loaden on September 15, 2010, 07:28:02 am
http://forums.codeblocks.org/index.php/topic,13310.msg89506/topicseen.html#msg89506 (http://forums.codeblocks.org/index.php/topic,13310.msg89506/topicseen.html#msg89506)
Static build!
Title: Re: cc_branch 6594 build faild: no intl library found
Post by: ollydbg on September 15, 2010, 09:29:05 am
Thanks Loaden and Morten.

exchndl is used to report the crash dump and call stack information, so I think it is necessary.

Now, I prefer Loaden's method because it can avoid the other dependency dll files when distribute C::B.
Title: Re: cc_branch 6594 build faild: no intl library found
Post by: ollydbg on September 15, 2010, 02:37:55 pm
It is as simple as follows (in fact I forgot to mention):

Download the following packages from the official MinGW site:
libintl-0.17-1-mingw32-dll-8.tar.lzma:
http://sourceforge.net/projects/mingw/files/MinGW/gettext/gettext-0.17-1/libintl-0.17-1-mingw32-dll-8.tar.lzma/download

gettext-0.17-1-mingw32-bin.tar.lzma:
http://sourceforge.net/projects/mingw/files/MinGW/gettext/gettext-0.17-1/gettext-0.17-1-mingw32-dev.tar.lzma/download

gettext-0.17-1-mingw32-dev.tar.lzma:
http://sourceforge.net/projects/mingw/files/MinGW/gettext/gettext-0.17-1/gettext-0.17-1-mingw32-bin.tar.lzma/download

...and put it into you regular GCC directory (TDM or alike). This will do it.

There is no need for another (self-compiled) dependency.

Alternatively you can also just deactivate the "exchndl" target (remove it from the virtual target named "All").

Hi, Morten, I guess you have forget some dll's.
I have just build the exchndl.dll.

I think in the package:  gettext-0.17-1-mingw32-dev.tar.lzma , there are the libs "libintl.a" and "libintl.dll.a", I guess by default, the linker will link to the "libintl.dll.a", so exchndl.dll is depend on the file "libintl-8.dll" from libintl-0.17-1-mingw32-dll-8.tar.lzma

I don't think we need "gettext-0.17-1-mingw32-bin.tar.lzma"

But, the "libintl-8.dll" is depend on the libiconv-2.dll which is from:
http://sourceforge.net/projects/mingw/files/MinGW/libiconv/libiconv-1.13.1-1/libiconv-1.13.1-1-mingw32-dll-2.tar.lzma/download

Am I right???

libiconv-1.13.1-1-mingw32-dll-2.tar
Title: Re: cc_branch 6594 build faild: no intl library found
Post by: MortenMacFly on September 15, 2010, 02:59:30 pm
But, the "libintl-8.dll" is depend on the libiconv-2.dll which is from:
http://sourceforge.net/projects/mingw/files/MinGW/libiconv/libiconv-1.13.1-1/libiconv-1.13.1-1-mingw32-dll-2.tar.lzma/download
True. That one I had installed already a long time ago. You may use a tool called "dependency walker" to find out such things...

Notice that alternatively in SVN still, there is the exchndl DLL without these dependencies. However, if we want to build it ourselves (to match the compiler / framework we use) these dependencies will be an issue (but solvable, obviously).
Title: Re: cc_branch 6594 build faild: no intl library found
Post by: ollydbg on September 15, 2010, 03:21:40 pm
But, the "libintl-8.dll" is depend on the libiconv-2.dll which is from:
http://sourceforge.net/projects/mingw/files/MinGW/libiconv/libiconv-1.13.1-1/libiconv-1.13.1-1-mingw32-dll-2.tar.lzma/download
True. That one I had installed already a long time ago. You may use a tool called "dependency walker" to find out such things...

Yes, I used "dependency walker" to find that the libintl-8.dll depend on "libiconv-2.dll".  :D
Title: Re: cc_branch 6594 build faild: no intl library found
Post by: Pecan on September 19, 2010, 02:59:55 pm
It is as simple as follows (in fact I forgot to mention):

Download the following packages from the official MinGW site:
libintl-0.17-1-mingw32-dll-8.tar.lzma:
http://sourceforge.net/projects/mingw/files/MinGW/gettext/gettext-0.17-1/libintl-0.17-1-mingw32-dll-8.tar.lzma/download

gettext-0.17-1-mingw32-bin.tar.lzma:
http://sourceforge.net/projects/mingw/files/MinGW/gettext/gettext-0.17-1/gettext-0.17-1-mingw32-dev.tar.lzma/download

gettext-0.17-1-mingw32-dev.tar.lzma:
http://sourceforge.net/projects/mingw/files/MinGW/gettext/gettext-0.17-1/gettext-0.17-1-mingw32-bin.tar.lzma/download

...and put it into you regular GCC directory (TDM or alike). This will do it.

There is no need for another (self-compiled) dependency.

Alternatively you can also just deactivate the "exchndl" target (remove it from the virtual target named "All").

What can we use to extract these files?

Windows 7Zip 4.3 does not extract them, saying their unsupported.

UPDATE:

I finally found an 7za.exe ver 7.65 that would extract the tar file.
However, CodeBlocks is asking for -lintl while the file from the lzma is named libintl-8.dll

Could we get some correct instructins on how to solve this?

thanks
 
Code
mingw32-g++.exe -shared   -Wl,--dll -Lbase\tinyxml -LC:\Usr\Proj\wxWidgets2810\lib\gcc_dll -Lbase\exchndl\lib  .objs\base\exchndl\exchndl.o   -o devel\exchndl.dll -mthreads  -lwxmsw28u -lbfd -liberty -lintl 
c:/usr/mingw431/bin/../lib/gcc/mingw32/4.3.1/../../../../mingw32/bin/ld.exe: cannot find -lintl
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings


Title: Re: cc_branch 6594 build faild: no intl library found
Post by: Loaden on September 19, 2010, 03:09:05 pm
What can we use to extract these files?
Windows 7Zip 4.3 does not extract them, saying their unsupported.
http://www.7-zip.org/ (http://www.7-zip.org/)
Title: Re: cc_branch 6594 build faild: no intl library found
Post by: Pecan on September 19, 2010, 03:54:38 pm
I believe I've follow the instructions provided by MortenMacFly, but I still get the -lintl not found error.

The mingw32 lib folder does *not* contain a libintil lib, but my c:\Usr\mingw431\bin\lib\ does.

Should I copy the gettext \bin\lib from the lzma file to the mingw32\lib instead?

thanks
Title: Re: cc_branch 6594 build faild: no intl library found
Post by: Pecan on September 19, 2010, 04:15:30 pm
I restored my mingw4.3.1 folder from it's original backup.
I copied the extracted contents of :

gettext-0.17-1-mingw32-dev.tar and
libintl-0.17-1-mingw32-dll-8.tar and
gettext-0.17-1-mingw32-bin.tar

to c:\Usr\mingw431\ and rebuilt codeblocks SVN (latest).
It will not compile.
I get the following results:
Code
-------------- Clean: exchndl in Code::Blocks ---------------

Cleaned "Code::Blocks - exchndl"

-------------- Clean: tinyXML in Code::Blocks ---------------

Cleaned "Code::Blocks - tinyXML"

-------------- Clean: AutoRevision in Code::Blocks ---------------

Cleaned "Code::Blocks - AutoRevision"

-------------- Clean: ConsoleRunner in Code::Blocks ---------------

Cleaned "Code::Blocks - ConsoleRunner"

-------------- Clean: Squirrel in Code::Blocks ---------------

Cleaned "Code::Blocks - Squirrel"

-------------- Clean: Squirrel std lib in Code::Blocks ---------------

Cleaned "Code::Blocks - Squirrel std lib"

-------------- Clean: SqPlus in Code::Blocks ---------------

Cleaned "Code::Blocks - SqPlus"

-------------- Clean: scintilla in Code::Blocks ---------------

Cleaned "Code::Blocks - scintilla"

-------------- Clean: wxpropgrid in Code::Blocks ---------------

Cleaned "Code::Blocks - wxpropgrid"

-------------- Clean: sdk in Code::Blocks ---------------

Cleaned "Code::Blocks - sdk"

-------------- Clean: src in Code::Blocks ---------------

Cleaned "Code::Blocks - src"

-------------- Clean: AStyle in Code::Blocks ---------------

Cleaned "Code::Blocks - AStyle"

-------------- Clean: Compiler depslib in Code::Blocks ---------------

Cleaned "Code::Blocks - Compiler depslib"

-------------- Clean: Compiler in Code::Blocks ---------------

Cleaned "Code::Blocks - Compiler"

-------------- Clean: Debugger in Code::Blocks ---------------

Cleaned "Code::Blocks - Debugger"

-------------- Clean: Code-completion in Code::Blocks ---------------

Cleaned "Code::Blocks - Code-completion"

-------------- Clean: Class wizard in Code::Blocks ---------------

Cleaned "Code::Blocks - Class wizard"

-------------- Clean: Default MIME handler in Code::Blocks ---------------

Cleaned "Code::Blocks - Default MIME handler"

-------------- Clean: Open files list in Code::Blocks ---------------

Cleaned "Code::Blocks - Open files list"

-------------- Clean: Scripted wizard in Code::Blocks ---------------

Cleaned "Code::Blocks - Scripted wizard"

-------------- Clean: To-do in Code::Blocks ---------------

Cleaned "Code::Blocks - To-do"

-------------- Clean: Autosave in Code::Blocks ---------------

Cleaned "Code::Blocks - Autosave"

-------------- Clean: XP look & feel in Code::Blocks ---------------

Cleaned "Code::Blocks - XP look & feel"

-------------- Clean: Projects-workspaces importer in Code::Blocks ---------------

Cleaned "Code::Blocks - Projects-workspaces importer"

-------------- Build: exchndl in Code::Blocks ---------------

mingw32-gcc.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE     -IC:\Usr\Proj\wxWidgets2810\include -IC:\Usr\Proj\wxWidgets2810\contrib\include -IC:\Usr\Proj\wxWidgets2810\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Isdk\wxpropgrid\include -Iinclude\tinyxml -Ibase\exchndl\include  -c C:\Usr\Proj\cbBeta\trunk\src\base\exchndl\exchndl.c -o .objs\base\exchndl\exchndl.o
mingw32-g++.exe -shared   -Wl,--dll -Lbase\tinyxml -LC:\Usr\Proj\wxWidgets2810\lib\gcc_dll -Lbase\exchndl\lib  .objs\base\exchndl\exchndl.o   -o devel\exchndl.dll -mthreads  -lwxmsw28u -lbfd -liberty -lintl
c:/usr/mingw431/bin/../lib/gcc/mingw32/4.3.1/../../../libbfd.a(section.o):section.c:(.text+0x86b): undefined reference to `___mingw_vsprintf'
c:/usr/mingw431/bin/../lib/gcc/mingw32/4.3.1/../../../libbfd.a(bfd.o):bfd.c:(.text+0x75b): undefined reference to `___mingw_vfprintf'
c:/usr/mingw431/bin/../lib/gcc/mingw32/4.3.1/../../../libbfd.a(bfd.o):bfd.c:(.text+0x7ab): undefined reference to `___mingw_vsprintf'
c:/usr/mingw431/bin/../lib/gcc/mingw32/4.3.1/../../../libbfd.a(bfd.o):bfd.c:(.text+0xecd): undefined reference to `___mingw_vfprintf'
c:/usr/mingw431/bin/../lib/gcc/mingw32/4.3.1/../../../libbfd.a(libbfd.o):libbfd.c:(.text+0x6ab): undefined reference to `___mingw_vfprintf'
c:/usr/mingw431/bin/../lib/gcc/mingw32/4.3.1/../../../libbfd.a(binary.o):binary.c:(.text+0x17b): undefined reference to `___mingw_vsprintf'
c:/usr/mingw431/bin/../lib/gcc/mingw32/4.3.1/../../../libbfd.a(coffgen.o):coffgen.c:(.text+0x8db): undefined reference to `___mingw_vfprintf'
c:/usr/mingw431/bin/../lib/gcc/mingw32/4.3.1/../../../libbfd.a(pei-i386.o):pei-i386.c:(.text+0x3bbb): undefined reference to `___mingw_vsprintf'
c:/usr/mingw431/bin/../lib/gcc/mingw32/4.3.1/../../../libbfd.a(srec.o):srec.c:(.text+0x35b): undefined reference to `___mingw_vsprintf'
c:/usr/mingw431/bin/../lib/gcc/mingw32/4.3.1/../../../libbfd.a(srec.o):srec.c:(.text+0x158b): undefined reference to `___mingw_vfprintf'
c:/usr/mingw431/bin/../lib/gcc/mingw32/4.3.1/../../../libbfd.a(tekhex.o):tekhex.c:(.text+0x3bb): undefined reference to `___mingw_vfprintf'
c:/usr/mingw431/bin/../lib/gcc/mingw32/4.3.1/../../../libbfd.a(ihex.o):ihex.c:(.text+0x1bb): undefined reference to `___mingw_vsprintf'
c:/usr/mingw431/bin/../lib/gcc/mingw32/4.3.1/../../../libbfd.a(syms.o):syms.c:(.text+0xeab): undefined reference to `___mingw_vfprintf'
c:/usr/mingw431/bin/../lib/gcc/mingw32/4.3.1/../../../libbfd.a(linker.o):linker.c:(.text+0xc9b): undefined reference to `___mingw_vsprintf'
c:/usr/mingw431/bin/../lib/gcc/mingw32/4.3.1/../../../libbfd.a(dwarf2.o):dwarf2.c:(.text+0xeab): undefined reference to `___mingw_vsprintf'
c:/usr/mingw431/bin/../lib/gcc/mingw32/4.3.1/../../../libbfd.a(peigen.o):peigen.c:(.text+0x94b): undefined reference to `___mingw_vfprintf'
c:/usr/mingw431/bin/../lib/gcc/mingw32/4.3.1/../../../libbfd.a(elflink.o):elflink.c:(.text+0x34bb): undefined reference to `___mingw_vsprintf'
c:/usr/mingw431/bin/../lib/gcc/mingw32/4.3.1/../../../libbfd.a(elf.o):elf.c:(.text+0x19bb): undefined reference to `___mingw_vsprintf'
c:/usr/mingw431/bin/../lib/gcc/mingw32/4.3.1/../../../libbfd.a(elf.o):elf.c:(.text+0x51ab): undefined reference to `___mingw_vfprintf'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
19 errors, 0 warnings

What else do I have to install to get codeblocks SVN to compile?

thanks
Title: Re: cc_branch 6594 build faild: no intl library found
Post by: Biplab on September 19, 2010, 06:27:15 pm
@Pecan,

You can also try linking against the libintl.dll file.


@Morten and other devs,

IMHO, we should remove exchndl target (Patch#2780) from our repo. When everything works fine without building exchndl.dll (by using a pre-built one) then why should we build it? It brings in more problems than it solves. My few cents. :)
Title: Re: cc_branch 6594 build faild: no intl library found
Post by: MortenMacFly on September 19, 2010, 09:25:08 pm
IMHO, we should remove exchndl target (Patch#2780) from our repo.
Well it works for me without any issues a very long time with different compilers, really. My intention was not to depend on a nearly unsupported DLL that we cannot compile. In the end this DLL is not provided with any GCC distro to my knowledge anymore. So I'd vote for at least leaving the sources in SVN (as a backup / reference) but probably disable compiling the target by simply removing it from the virtual "All" target. How does that sound?
Title: Re: cc_branch 6594 build faild: no intl library found
Post by: Loaden on September 20, 2010, 02:27:49 am
IMHO, we should remove exchndl target (Patch#2780) from our repo.
Well it works for me without any issues a very long time with different compilers, really. My intention was not to depend on a nearly unsupported DLL that we cannot compile. In the end this DLL is not provided with any GCC distro to my knowledge anymore. So I'd vote for at least leaving the sources in SVN (as a backup / reference) but probably disable compiling the target by simply removing it from the virtual "All" target. How does that sound?
Hi, All, any comment about this patch?
I can remove the libintl depend.

I am just add a file named "intlimpl.c", here is the content.
Code
/*
 * This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
 * http://www.gnu.org/licenses/lgpl-3.0.html
 */

const char* libintl_dgettext (const char *__domainname, const char *__msgid)
{
    return __msgid;
}
Title: Re: cc_branch 6594 build faild: no intl library found
Post by: MortenMacFly on September 20, 2010, 07:03:30 am
Hi, All, any comment about this patch?
Nice try, however, the other dependencies remain. So if one is not willing to install dependencies this is not really a solution. I guess we can discuss this again with the next release. If we would have shipped GCC with these dependencies on-board less people would have complained. Until then we should just remove it from the "all" target.
Title: Re: cc_branch 6594 build faild: no intl library found
Post by: Loaden on September 20, 2010, 07:28:16 am
however, the other dependencies remain.
I am not understand.
What is the other dependencies?

If you keep the "intl" linker library, we can build success too.
This solution tell us, we do not need install gettext library, and can build CB success.
Title: Re: cc_branch 6594 build faild: no intl library found
Post by: MortenMacFly on September 20, 2010, 07:49:01 am
What is the other dependencies?
You'll need:
gettext-0.17-1-mingw32-bin
gettext-0.17-1-mingw32-dev
libintl-0.17-1-mingw32-dll-8
These I meant.

Also see here:
http://forums.codeblocks.org/index.php/topic,13308.msg89509.html#msg89509
Title: Re: cc_branch 6594 build faild: no intl library found
Post by: Loaden on September 20, 2010, 09:16:24 am
What is the other dependencies?
You'll need:
gettext-0.17-1-mingw32-bin
gettext-0.17-1-mingw32-dev
libintl-0.17-1-mingw32-dll-8
These I meant.

Also see here:
http://forums.codeblocks.org/index.php/topic,13308.msg89509.html#msg89509
Use my method, they no longer need it! !
Please apply the patch in local, and test, you will found what is the meaning.
Title: Re: cc_branch 6594 build faild: no intl library found
Post by: Loaden on September 20, 2010, 09:28:33 am
Let's me have more explain.
After apply "cc_remove_libintl_depend.patch", we *do not* need install any depend librarys as http://forums.codeblocks.org/index.php/topic,13308.msg89509.html#msg89509
Because in exchndl, there only need call libintl_dgettext function for i18n.
But we can avoid i18n support, because it is unnecessary for crash report.
Title: Re: cc_branch 6594 build faild: no intl library found
Post by: ollydbg on September 20, 2010, 09:30:51 am
After apply "cc_remove_libintl_depend.patch", we *do not* need install any depend librarys as http://forums.codeblocks.org/index.php/topic,13308.msg89509.html#msg89509
that sounds great!!!
Title: Re: cc_branch 6594 build faild: no intl library found
Post by: Biplab on September 20, 2010, 09:33:38 am
IMHO, we should remove exchndl target (Patch#2780) from our repo.
Well it works for me without any issues a very long time with different compilers, really. My intention was not to depend on a nearly unsupported DLL that we cannot compile. In the end this DLL is not provided with any GCC distro to my knowledge anymore. So I'd vote for at least leaving the sources in SVN (as a backup / reference) but probably disable compiling the target by simply removing it from the virtual "All" target. How does that sound?

This sounds good to me.
Title: Re: cc_branch 6594 build faild: no intl library found
Post by: MortenMacFly on September 20, 2010, 09:37:02 am
This sounds good to me.
Right, I had a second look at Loadens attempt and this sounds reasonable, too.

however, I am not able to commit anything as I am on travel. Biplab: If you find the time, could you please apply Loadens patch (I'll extend it to unix later) and then still remove this target from "All"? I'd like to avoid any further noise on that topic.
Title: Re: cc_branch 6594 build faild: no intl library found
Post by: Biplab on September 20, 2010, 09:58:06 am
This sounds good to me.
Right, I had a second look at Loadens attempt and this sounds reasonable, too.

however, I am not able to commit anything as I am on travel. Biplab: If you find the time, could you please apply Loadens patch (I'll extend it to unix later) and then still remove this target from "All"? I'd like to avoid any further noise on that topic.

Ok. I'll commit it tonight.
Title: Re: cc_branch 6594 build faild: no intl library found
Post by: Biplab on September 20, 2010, 06:29:17 pm
Ok. I'll commit it tonight.

I can't update my repo at the moment due to svn issue.


@Jens / Morten / Other devs,

Feel free to commit this as I would only be able to commit it tomorrow evening. Thanks!
Title: Re: cc_branch 6594 build faild: no intl library found
Post by: Biplab on September 21, 2010, 04:03:05 pm
@Jens / Morten / Other devs,

Feel free to commit this as I would only be able to commit it tomorrow evening. Thanks!

Thanks Morten for the commit.