Re: [wx-dev] Compile problems with installing wxWidgets on Redhat!

83 views
Skip to first unread message

Vadim Zeitlin

unread,
Nov 15, 2012, 2:13:25 PM11/15/12
to wx-...@googlegroups.com
On Thu, 15 Nov 2012 11:06:05 -0800 (PST) jdx wrote:

j> We are in the process of porting our UI S/W from Windows to Redhat 6.1. I
j> have downloaded wxWidget 2.9.4, and I was attempting to install it on
j> Redhat. I have ran into some issues with compiling during the
j> installation/configuration process. I was following the instructions listed
j> in the "install.txt" file in the docs/x11 folder,

This is probably not relevant to your problem but this is not the right
file, unless you do use wxX11 and not wxGTK which would be surprising.
Please see docs/gtk/install.txt. But in short, it's just the perfectly
usual configure+make anyhow.

j> but it stopped while attempting to build tif_aux.c. Can someone please
j> help with this?

Not if you don't tell us anything about the error you got (please don't
post the entire build log neither however, just the relevant parts).

Also notice that you can avoid building the bundled libtiff entirely if
you install your system dev package for libtiff and rerun configure (pay
attention to what it says about system libtiff detection). The same holds
for libjpeg and libpng and it's actually a good idea to use your system
packages if you plan to use the binary on this system only.

Regards,
VZ

jdx

unread,
Nov 15, 2012, 2:31:00 PM11/15/12
to wx-...@googlegroups.com
This are some of the compile errors...

In file include from ./src/tiff/libtiff/tif_aux.c:32

./src/tiff/libtiff/tiffiop.h:56 errror expected declaration specifiers or ‘…’ before ‘size_t’

./src/tiff/libtiff/tiffiop.h:56 errror expected declaration specifiers or ‘…’ before ‘size_t’

In file include from ./src/tiff/libtiff/tiffio.h:33

           from ./src/tiff/libtiff/tiffiop.h:60

                         from ./src/tiff/libtiff/tif_aux.c:32

./src/tiff/libtiff/tiff.h:76:5: warning: “SIZEOF_INT” is not defined

./src/tiff/libtiff/tiff.h:81:7: warning: “SIZEOF_INT” is not defined

In file include from ./src/tiff/libtiff/tiffio.h:33

           from ./src/tiff/libtiff/tiffiop.h:60

                         from ./src/tiff/libtiff/tif_aux.c:32

./src/tiff/libtiff/tiff.h:104: error: expected specifier-qualifier-list before ‘uint32’

./src/tiff/libtiff/tiff.h:104: error: expected specifier-qualifier-list before ‘uint32’

Vadim Zeitlin

unread,
Nov 15, 2012, 2:46:29 PM11/15/12
to wx-...@googlegroups.com
On Thu, 15 Nov 2012 11:31:00 -0800 (PST) jdx wrote:

j> In file include from ./src/tiff/libtiff/tif_aux.c:32
j>
j> ./src/tiff/libtiff/tiffiop.h:56 errror expected declaration specifiers or
j> ‘…’ before ‘size_t’

This is pretty strange, what version of gcc do you use that it doesn't
like unnamed prototypes?

Also, this line is normally not supposed to be compiled at all because
HAVE_SEARCH_H should be defined by configure. I have a suspicion that this
could be a problem due to building in the source directory. Could you
please retry building in a separate build directly, as advised in the
install.txt file, and tell us if it helps?

Thanks,
VZ

jdx

unread,
Nov 15, 2012, 3:08:10 PM11/15/12
to wx-...@googlegroups.com
Redhat 6.1 and I'm using gcc 4.4.5.6 compiler

jdx

unread,
Nov 15, 2012, 3:10:41 PM11/15/12
to wx-...@googlegroups.com
Also, I followed the install instructions exactly as they are written. I created a separate directory, and I have retried it 3-4 times.

jdx

unread,
Nov 15, 2012, 3:13:14 PM11/15/12
to wx-...@googlegroups.com
One other thing...I'm using a 32-bit version of Redhat. It may not make a difference but I just wanted to let you know.

Vadim Zeitlin

unread,
Nov 15, 2012, 3:29:46 PM11/15/12
to wx-...@googlegroups.com
On Thu, 15 Nov 2012 12:10:41 -0800 (PST) jdx wrote:

j> Also, I followed the install instructions exactly as they are written.

Well, the ones in docs/x11/install.txt don't mention creating a separate
directory, so I wasn't sure about this.

j> I created a separate directory, and I have retried it 3-4 times.

I really don't know what's going on here then. It definitely looks like
the compilation picks up the tif_config.h file from the source wxWidgets
directory instead of the one that should have been generated in the build
directory by configure. Or maybe you have tif_config.h in /usr/include
somehow? You could try executing the failing command manually appending
"-H" option to it, what does it say about tif_config.h, where does it come
from?

Regards,
VZ

Jens Lody

unread,
Nov 15, 2012, 3:39:33 PM11/15/12
to wx-...@googlegroups.com
Just to be sure: did you try the x11-build in the same subdirectory ?
If yes, did you really clean the folder (best would be to rm -rf the
whole folder) ?
Otherwise incoorect files might remain in .deps or .pch .

Jens
--

Jens Lody

Code::Blocks core developer
http://www.codeblocks.org/

(Un-)official debian-repository for Code::Blocks:
http://apt.jenslody.de/

(Un-)official Fedora- and RedHat/CentOS-repository for Code::Blocks:
http://rpm.jenslody.de/


|\ _,,,---,,_
/,`.-'`' -. ;-;;,_
<|,4- ) )-,_..;\ ( `'-'
'---''(_/--' `-'\_)
signature.asc

jdx

unread,
Nov 15, 2012, 4:17:58 PM11/15/12
to wx-...@googlegroups.com, deb...@jenslody.de
@Jens: No I deleted everything and started over each time. My base dir is wx/..., and this folder is where I unzipped the original zip file. I performed the rm -rf command on the wx directory.

Jens Lody

unread,
Nov 15, 2012, 4:21:52 PM11/15/12
to wx-...@googlegroups.com
Am Donnerstag, den 15.11.2012, 21:39 +0100 schrieb Jens Lody:
> Am Donnerstag, den 15.11.2012, 21:29 +0100 schrieb Vadim Zeitlin:
> > On Thu, 15 Nov 2012 12:10:41 -0800 (PST) jdx wrote:
> >
> > j> Also, I followed the install instructions exactly as they are written.
> >
> > Well, the ones in docs/x11/install.txt don't mention creating a separate
> > directory, so I wasn't sure about this.
> >
> > j> I created a separate directory, and I have retried it 3-4 times.
> >
> > I really don't know what's going on here then. It definitely looks like
> > the compilation picks up the tif_config.h file from the source wxWidgets
> > directory instead of the one that should have been generated in the build
> > directory by configure. Or maybe you have tif_config.h in /usr/include
> > somehow? You could try executing the failing command manually appending
> > "-H" option to it, what does it say about tif_config.h, where does it come
> > from?
> >
> > Regards,
> > VZ
>
> Just to be sure: did you try the x11-build in the same subdirectory ?
> If yes, did you really clean the folder (best would be to rm -rf the
> whole folder) ?
> Otherwise incoorect files might remain in .deps or .pch .
>
> Jens

I just tested it here on a (virtual) CentOS 6.3 (64-bit) with gcc 4.4.6
and it compiles without issues.
By the way: if you compile from inside a seperate build-folder, it can
not be "./src...."in the error message, it must be "../src..." (or
another relative folder).
If the error still occurs, you should make sure your sources and your
build-directory are really clean (reinstall ?).
signature.asc

Jens Lody

unread,
Nov 15, 2012, 4:24:41 PM11/15/12
to wx-...@googlegroups.com
Am Donnerstag, den 15.11.2012, 13:17 -0800 schrieb jdx:
> @Jens: No I deleted everything and started over each time. My base dir is
> wx/..., and this folder is where I unzipped the original zip file. I
> performed the rm -rf command on the wx directory.

Here is the configure line I have used:
../configure --with-zlib=sys --disable-reserved_virtual --enable-debug
--enable-debug_info --enable-debug_gdb --enable-unicode --with-gtk=2
--enable-mediactrl --enable-sound --with-sdl --enable-display
--enable-geometry --enable-graphics_ctx --with-libjpeg=builtin
--with-libpng=sys --with-libtiff=builtin --with-opengl

Jens
signature.asc

jdx

unread,
Nov 15, 2012, 4:27:13 PM11/15/12
to wx-...@googlegroups.com
@VZ: I agree. For some reason, it seems to be pulling the "tif_config.h" from wx/src instead of wx/buildgtk/src, but I'm not sure why. I do not have tif_config.h in my /usr/include. I will try the manual option.

jdx

unread,
Nov 15, 2012, 4:30:38 PM11/15/12
to wx-...@googlegroups.com, deb...@jenslody.de
Jen, could that be the difference, i'm using Redhat 6.1 32-bit?

jdx

unread,
Nov 15, 2012, 4:35:29 PM11/15/12
to wx-...@googlegroups.com, deb...@jenslody.de
I used what was in the the install.txt file which was...

../configure --with-gtk

Should I used the other options too?

Manolo

unread,
Nov 15, 2012, 5:20:46 PM11/15/12
to wx-...@googlegroups.com
After reading this post, I have not yet a clear information of if you are
trying
to build X11 port or GTK port.
X11 lacks some things and has low maintenance. Try with GTK.

Just to make sure you may get something that works:
1) Create a subdirectory of your wx folder, let's call it "gtkbuid"
mkdir gtkbuild
2) Enter into that directory
cd gtkbuild
3) Run 'configure'
./configure --with-gtk --enable-debug
4) Run 'make':
make

Does this work? If yes, let's try the minimal sample:
5) Stay in that folder (gtkbuild)
6) Enter in the minimal directory sample for that build
cd samples/minimal
7) Compile
make

Does this work too?

If you prefer the X11 port just change '--with-gkt' flag with
'--with-x11' flag

In order of your own apps find wx libs you need also (after step 4)
make install
ldconfig

Perphaps reading also docs/gtk/install.txt is a good idea.

Regards,
Manolo

jdx

unread,
Nov 16, 2012, 11:37:24 AM11/16/12
to wx-...@googlegroups.com
Manolo,

Thanks for your help!

I followed your exact steps and got the same results as I mentioned above. This happens every time after I do step 4. When compiling tif_unix.c I get the following:

In file included from ../src/tiff/libtiff/tiffio.h:33,
                     from ../src/tiff/libtiff/tiffiop.h:60,
                     from ../src/tiff/libtiff/tif_unix:53:
../src/tiff/libtiff/tiff.h:76:5: warning: "SIZEOF_INT" is not defined
../src/tiff/libtiff/tiff.h:81:7: warning: "SIZEOF_LONG" is not defined
In file included from ../src/tiff/libtiff/tiffio.h:33,
                     from ../src/tiff/libtiff/tiffiop.h:60,
                     from ../src/tiff/libtiff/tif_unix:53:
../src/tiff/libtiff/tiff.h:104: error: expected specifier-qualifier-list before 'uint32'
../src/tiff/libtiff/tiff.h:123: error: expected specifier-qualifier-list before 'uint32'

These are the exact same error I get when I use the GKT port and the X11.

Each time I start over, I DELETE the parent folder (i.e., wx), created a new folder with a different name, copied the zip file from the CD into the new folder, unzipped it in the new folder and followed the exact steps you listed. Each time I get the same warnings and errors with tif_unix.c.

Could there be something else I'm missing?
---------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------------

Manolo

unread,
Nov 16, 2012, 11:51:54 AM11/16/12
to wx-...@googlegroups.com
Maybe you have not installed build-essential package?
And perhaps also Gtk+ developer package (some name like "libgtk-2.0-dev")

Useful reading:
http://wiki.wxwidgets.org/Compiling_and_getting_started

Regards,
Manolo

Jens Lody

unread,
Nov 16, 2012, 5:03:29 PM11/16/12
to wx-...@googlegroups.com
Am Freitag, den 16.11.2012, 08:37 -0800 schrieb jdx:
> Manolo,
>
> Thanks for your help!
>
> I followed your exact steps and got the same results as I mentioned above.
> This happens every time after I do step 4. When compiling tif_unix.c I get
> the following:
>
> In file included from ../src/tiff/libtiff/tiffio.h:33,
> from ../src/tiff/libtiff/tiffiop.h:60,
> from ../src/tiff/libtiff/tif_unix:53:
Do you really get this, without the file-ending ?
Should be tif_unix.c I think.
> ../src/tiff/libtiff/tiff.h:76:5: warning: "SIZEOF_INT" is not defined
> ../src/tiff/libtiff/tiff.h:81:7: warning: "SIZEOF_LONG" is not defined
> In file included from ../src/tiff/libtiff/tiffio.h:33,
> from ../src/tiff/libtiff/tiffiop.h:60,
> from ../src/tiff/libtiff/tif_unix:53:
> ../src/tiff/libtiff/tiff.h:104: error: expected specifier-qualifier-list
> before 'uint32'
> ../src/tiff/libtiff/tiff.h:123: error: expected specifier-qualifier-list
> before 'uint32'
>
> These are the exact same error I get when I use the GKT port and the X11.
>
All these defines should be defined in tiffconf.h and tiff.h or
something went wrong when running the configure-script.
signature.asc

Alexandre Herbreteau

unread,
Dec 8, 2012, 8:58:22 AM12/8/12
to wx-...@googlegroups.com, deb...@jenslody.de
Hello,

at this time it seems no answer solved your problem.
But I may be wrong because I don't read all of your previous messages.... but there is surprisingly no answer after the 16 nov.

I had this problem today, same errors while building wxWidgets even if configure ran without any problem.
Actually, I downloaded .zip version of wx 2.9.4 (with end lines formatted for windows).
Finally, I tried to download the .tar.bz2 and this is working fine under my ubuntu distribution.

I hope it will solve your problem too.
Good luck.
Bye
Alexandre.
Reply all
Reply to author
Forward
0 new messages