Author Topic: cc_branch 6594 build faild: no intl library found  (Read 32558 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
cc_branch 6594 build faild: no intl library found
« 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.

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: cc_branch 6594 build faild: no intl library found
« Reply #1 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").
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: cc_branch 6594 build faild: no intl library found
« Reply #3 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.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: cc_branch 6594 build faild: no intl library found
« Reply #4 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
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: cc_branch 6594 build faild: no intl library found
« Reply #5 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).
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: cc_branch 6594 build faild: no intl library found
« Reply #6 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
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: cc_branch 6594 build faild: no intl library found
« Reply #7 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


« Last Edit: September 19, 2010, 03:37:04 pm by Pecan »

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: cc_branch 6594 build faild: no intl library found
« Reply #8 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/

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: cc_branch 6594 build faild: no intl library found
« Reply #9 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
« Last Edit: September 19, 2010, 04:04:52 pm by Pecan »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: cc_branch 6594 build faild: no intl library found
« Reply #10 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
« Last Edit: September 19, 2010, 04:38:03 pm by Pecan »

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: cc_branch 6594 build faild: no intl library found
« Reply #11 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. :)
Be a part of the solution, not a part of the problem.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: cc_branch 6594 build faild: no intl library found
« Reply #12 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?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: cc_branch 6594 build faild: no intl library found
« Reply #13 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;
}
« Last Edit: September 20, 2010, 09:19:02 am by Loaden »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: cc_branch 6594 build faild: no intl library found
« Reply #14 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ