JPEG parameter struct mismatch: library thinks size is 464, caller expects 428

1,754 views
Skip to first unread message

Lane

unread,
Mar 14, 2009, 9:06:46 AM3/14/09
to G3D Users
I'm G3D 7.01 on Ubuntu 8.10, and I get this error when I try to run a
new project created by icompile according to these instructions:
http://g3d-cpp.sourceforge.net/manual/guidenewunix.html I suspect G3D
was built against a different version of libjpeg than the one getting
loaded when the project runs. I'm not sure how to fix this. Has
anyone seen this before?

Lane

unread,
Mar 14, 2009, 10:05:39 AM3/14/09
to G3D Users
I think the problem might have to do with the fact that G3D ships with
code for libjpeg and other libraries. Then it gets built against the
headers it ships with and not the ones that are already installed on
the system. The popular Linux distributions already provide packages
for these libraries. What changes would I have to make to have the
the build system to only build G3D and GLG3D?

corey taylor

unread,
Mar 14, 2009, 1:50:33 PM3/14/09
to g3d-...@googlegroups.com

This should already be the setup although we have users report this occassionally on older versions.

You could simply delete the headers to see if that's the problem then rebuild g3d.

corey

On Mar 14, 2009 10:05 AM, "Lane" <phil...@cs.umn.edu> wrote:


I think the problem might have to do with the fact that G3D ships with
code for libjpeg and other libraries.  Then it gets built against the
headers it ships with and not the ones that are already installed on
the system.  The popular Linux distributions already provide packages
for these libraries.  What changes would I have to make to have the
the build system to only build G3D and GLG3D?

On Mar 14, 8:06 am, Lane <phill...@cs.umn.edu> wrote: > I'm G3D 7.01 on Ubuntu 8.10, and I get this...

corey taylor

unread,
Mar 15, 2009, 5:08:44 AM3/15/09
to g3d-...@googlegroups.com
Also, do you have both 32-bit and 64-bit versions of the dev library
installed? I have a feeling you might be compiling with one set and
running with another.

corey

Lane

unread,
Mar 15, 2009, 9:08:13 PM3/15/09
to G3D Users
I just downloaded from the 7.01 Source link on this page:
http://g3d-cpp.sourceforge.net/downloads.html, and then ran buildg3d --
install update. I didn't see any place where I could specify 32- or
64-bit versions.

I think my real question is: Has anybody got G3D 7.01 running on
Ubuntu 8.10? How did you do it? It's a popular distro, so I don't
imagine I'm the first to try it.

BTW, I really appreciate the quick responses to my questions.

On Mar 15, 4:08 am, corey taylor <corey.tay...@gmail.com> wrote:
> Also, do you have both 32-bit and 64-bit versions of the dev library
> installed?  I have a feeling you might be compiling with one set and
> running with another.
>
> corey
>
> On Sat, Mar 14, 2009 at 1:50 PM, corey taylor <corey.tay...@gmail.com> wrote:
> > This should already be the setup although we have users report this
> > occassionally on older versions.
>
> > You could simply delete the headers to see if that's the problem then
> > rebuild g3d.
>
> > corey
>

corey taylor

unread,
Mar 16, 2009, 1:24:17 AM3/16/09
to g3d-...@googlegroups.com
You wouldn't specify it with the G3D build, it would find the library
headers on the system.

We might have a problem when there are two versions of the library
installed. We might not be checking for the 64-bit version first.

Can you tell me where your libjpeg headers are? If you run ldd on the
executable, you will probably see it linked with the 64-bit libjpeg
which probably won't match where the headers are located.

corey

Lane

unread,
Mar 16, 2009, 10:17:19 AM3/16/09
to G3D Users
I got it working. I just commented out the following lines in
CMakeLists.txt and rebuilt G3D:

# add jpeg library on systems that need it
#IF (NOT JPEG_FOUND)
# SET (JPEG_LIBRARIES jpeg)
# SET (JPEG_INCLUDE_DIR ${G3D_SOURCE_DIR}/jpeg.lib/include)
# ADD_SUBDIRECTORY (jpeg.lib)
#ENDIF (NOT JPEG_FOUND)

So for whatever reason, CMake was not finding the libjpeg installation
and substituted its own copy of the headers. But when I ran my
application it found the original libjpeg and there was a mismatch.

Here's the output of ldd if you're still curious:

$ ldd build/linux-i686-g++4.3/g3dtestd
linux-gate.so.1 => (0xb7f2a000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb7e0e000)
libavformat.so.52 => /usr/lib/i686/cmov/libavformat.so.52
(0xb7d6d000)
libavcodec.so.51 => /usr/lib/i686/cmov/libavcodec.so.51 (0xb7820000)
libavutil.so.49 => /usr/lib/i686/cmov/libavutil.so.49 (0xb7810000)
libGLU.so.1 => /usr/lib/libGLU.so.1 (0xb779f000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7788000)
libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0xb76f6000)
libGL.so.1 => /usr/lib/libGL.so.1 (0xb7653000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb763a000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb761a000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb75f4000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7505000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb74df000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb74d0000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7372000)
libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb736f000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb7356000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7352000)
libgsm.so.1 => /usr/lib/libgsm.so.1 (0xb7344000)
libtheora.so.0 => /usr/lib/libtheora.so.0 (0xb72f9000)
libvorbisenc.so.2 => /usr/lib/libvorbisenc.so.2 (0xb71ff000)
libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0xb71d5000)
libasound.so.2 => /usr/lib/libasound.so.2 (0xb710d000)
libdirectfb-1.0.so.0 => /usr/lib/libdirectfb-1.0.so.0 (0xb70a6000)
libfusion-1.0.so.0 => /usr/lib/libfusion-1.0.so.0 (0xb709d000)
libdirect-1.0.so.0 => /usr/lib/libdirect-1.0.so.0 (0xb7088000)
libGLcore.so.1 => /usr/lib/libGLcore.so.1 (0xb6311000)
libnvidia-tls.so.1 => /usr/lib/tls/libnvidia-tls.so.1 (0xb630f000)
libXext.so.6 => /usr/lib/libXext.so.6 (0xb62ff000)
/lib/ld-linux.so.2 (0xb7f10000)
libXau.so.6 => /usr/lib/libXau.so.6 (0xb62fc000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb62f7000)
libogg.so.0 => /usr/lib/libogg.so.0 (0xb62f1000)
librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb62e8000)


On Mar 16, 12:24 am, corey taylor <corey.tay...@gmail.com> wrote:
> You wouldn't specify it with the G3D build, it would find the library
> headers on the system.
>
> We might have a problem when there are two versions of the library
> installed.  We might not be checking for the 64-bit version first.
>
> Can you tell me where your libjpeg headers are?  If you run ldd on the
> executable, you will probably see it linked with the 64-bit libjpeg
> which probably won't match where the headers are located.
>
> corey
>

corey taylor

unread,
Mar 16, 2009, 12:52:16 PM3/16/09
to g3d-...@googlegroups.com

Cmake is not the supported build system.  Please just use buildg3d.

corey

On Mar 16, 12:24 am, corey taylor <corey.tay...@gmail.com> wrote: > You wouldn't specify it with t...

> On Sun, Mar 15, 2009 at 9:08 PM, Lane <phill...@cs.umn.edu> wrote: > > > I just downloaded from th...

Reply all
Reply to author
Forward
0 new messages