Re: weird linking errors with exiv2
by Simson Garfinkel
>
> Well, you could Use also on command line simply -Wc,lexiv2.dll option.
> By this you are choosing always the shared variant (which is used in
> scan_exif.cpp source via dllimport). By this the link-failures should
> be gone.
> Not sure about it, but for testing you might want to remove the
> libexiv2.la file.
>
> Another way to solve this, so that you are able to use static version
> here, is to make sure that in scan_exif.cpp for imported libexiv2 API
> no dllimport attribute gets specified.
Thanks, Kai. I did delete the libexiv2.la file and am seeing the same behavior.
Can you tell me how to specify the "no dllimport attribute?"
Thanks again.
Simson
12 years, 7 months
Heads up: mingw builds of GNOME 3.2 libraries in F16
by Kalev Lember
Hello,
I have updated various MinGW cross-compiled libraries to GNOME 3.2
versions in F16. They are currently in updates-testing queue; would
be great if anyone could give the new builds a try:
https://admin.fedoraproject.org/updates/FEDORA-2011-13605
Most of our mingw-specific patches are now upstream and it's mostly just
vanilla tarball builds.
mingw32-atk-2.2.0
mingw32-cairomm-1.10.0
mingw32-glib2-2.30.0
mingw32-glibmm24-2.30.0
mingw32-glib-networking-2.30.0
mingw32-gtk3-3.2.0
mingw32-gtkmm30-3.2.0
mingw32-gtksourceview3-3.2.0
mingw32-libsigc++20-2.2.10
mingw32-libsoup-2.36.0
mingw32-libxml++-2.34.2
mingw32-pango-1.29.4
mingw32-pangomm-2.28.3
mingw32-webkitgtk-1.6.1
--
Best regards,
Kalev
12 years, 7 months
configuration for compiling libraries
by Simson Garfinkel
All,
This is the line that I'm currently using for configuring an auto-tools generated configure script for libraries with mingw64:
> $ ./configure --host=x86_64-w64-mingw32 --prefix=/usr/x86_64-w64-mingw32/sys-root/mingw/
This seems to work with most libraries but not all. My questions:
1 - Why is the --prefix needed? Shouldn't the configure scripts automatically figure out where the include and libraries go?
2 - Is this correct?
Thanks,
Simson
12 years, 7 months
Re: weird linking errors with exiv2
by Simson Garfinkel
> Date: Sat, 1 Oct 2011 20:30:46 +0200
> From: Kai Tietz <ktietz70(a)googlemail.com>
> Subject: Re: weird linking errors with exiv2
> To: "Fedora MinGW (Windows cross-compiler) project"
> <mingw(a)lists.fedoraproject.org>
> Cc: ahuggel(a)gmx.net
> Message-ID:
> <CAEwic4aBk0arJYrxc-suedToUAE24cFtjeC4A_8sOL1Sna1U4g(a)mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> So is libexiv2.a a static library or an DLL import library?
>
> As far as I can see are just __imp_ symbols undefined. If libexiv2.a
> is an static library, then they are of course not present. Might it
> be that there is also an libexiv2.dll.a import-library?
>
> Regards,
> Kai
Kai,
Thanks for your email.
In fact, I did have both the .dll and the static library:
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/libexiv2.a
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/libexiv2.dll.a
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/libexiv2.la
As a reminder, my link command says "--static":
> x86_64-w64-mingw32-g++ -g -D_FORTIFY_SOURCE=2 -Wall -D_FORTIFY_SOURCE=2
> -Wall -Wno-format --static -mthreads -o bulk_extractor.exe
> bulk_extractor.o threadpool.o context_list.o histogram.o utils.o support.o
> base64_forensic.o feature_recorder.o feature_recorder_set.o image_process.o
> image_process_fts.o sbuf.o md5.o scan_ccns2.o scan_find.o scan_net.o
> scan_wordlist.o scan_exif.o scan_base64.o xml.o scan_zip.o scan_gzip.o
> scan_pdf.o scan_aes.o scan_json.o scan_winprefetch.o scan_hiberfile.o
> pyxpress.o scan_email.o scan_accts.o scan_kml.o scan_gps.o -lewf -lz
> -lpthreadGC2 -lws2_32 -lgdi32 -lexiv2 -lexpat
I removed the library:
$ sudo /bin/rm /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libexiv2.dll.a
$ sudo /bin/rm /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libexiv2.la
And got the same error:
scan_exif.o: In function `scan_exif':
/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:168: undefined reference to `__imp__ZN5Exiv212ImageFactory4openEPKhl'
/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:169: undefined reference to `__imp__ZNK5Exiv25Image4goodEv'
/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:202: undefined reference to `__imp__ZNK5Exiv25Value8toStringEv'
/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:204: undefined reference to `__imp__ZNK5Exiv25Value8toStringEv'
/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:214: undefined reference to `__imp__ZNK5Exiv25Value8toStringEv'
/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:217: undefined reference to `__imp__ZNK5Exiv25Value8toStringEv'
/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:220: undefined reference to `__imp__ZNK5Exiv25Value8toStringEv'
scan_exif.o:/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:223: more undefined references to `__imp__ZNK5Exiv25Value8toStringEv' follow
This really has me stumped. My only recourse seems to be to find another exif library.
12 years, 7 months
Broken dependencies in EPEL - 2011-10-02
by Fedora Koji Build System
Your following packages in the repository suffer from broken dependencies:
======================================================================
The results in this summary consider Test Updates!
======================================================================
package: mingw32-libpng-1.2.37-3.el6.noarch from fedora-epel-6-ppc64
unresolved deps:
mingw32(msvcrt.dll)
mingw32(zlib1.dll)
mingw32(kernel32.dll)
mingw32-filesystem >= 0:63
mingw32-runtime
12 years, 7 months
weird linking errors with exiv2
by Simson Garfinkel
Hi. I'm using exiv2 with mingw32 and mingw64. For reasons that are not clear
to me I get linking errors with mingw64 but not with mingw32. I'm building
and installing the library the same way with both. Any idea what I should
do?
Below is the error that I'm getting:
x86_64-w64-mingw32-g++ -g -D_FORTIFY_SOURCE=2 -Wall -D_FORTIFY_SOURCE=2
-Wall -Wno-format --static -mthreads -o bulk_extractor.exe
bulk_extractor.o threadpool.o context_list.o histogram.o utils.o support.o
base64_forensic.o feature_recorder.o feature_recorder_set.o image_process.o
image_process_fts.o sbuf.o md5.o scan_ccns2.o scan_find.o scan_net.o
scan_wordlist.o scan_exif.o scan_base64.o xml.o scan_zip.o scan_gzip.o
scan_pdf.o scan_aes.o scan_json.o scan_winprefetch.o scan_hiberfile.o
pyxpress.o scan_email.o scan_accts.o scan_kml.o scan_gps.o -lewf -lz
-lpthreadGC2 -lws2_32 -lgdi32 -lexiv2 -lexpat
scan_exif.o: In function `scan_exif':
/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:168: undefined
reference to `__imp__ZN5Exiv212ImageFactory4openEPKhl'
/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:169: undefined
reference to `__imp__ZNK5Exiv25Image4goodEv'
/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:202: undefined
reference to `__imp__ZNK5Exiv25Value8toStringEv'
/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:204: undefined
reference to `__imp__ZNK5Exiv25Value8toStringEv'
/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:214: undefined
reference to `__imp__ZNK5Exiv25Value8toStringEv'
/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:217: undefined
reference to `__imp__ZNK5Exiv25Value8toStringEv'
/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:220: undefined
reference to `__imp__ZNK5Exiv25Value8toStringEv'
scan_exif.o:/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:223:
more undefined references to `__imp__ZNK5Exiv25Value8toStringEv' follow
scan_exif.o: In function `Exiv2::LogMsg::setLevel(Exiv2::LogMsg::Level)':
/usr/x86_64-w64-mingw32/sys-root/mingw/include/exiv2/error.hpp:116:
undefined reference to `__imp__ZN5Exiv26LogMsg6level_E'
collect2: ld returned 1 exit status
make[2]: *** [bulk_extractor.exe] Error 1
make[2]: Leaving directory `/home/simsong/domex/src/bulk_extractor/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/simsong/domex/src/bulk_extractor'
make: *** [all] Error 2
Here is the usage for the exiv2 configure:
simsong@FC15:~/exiv2-0.22$ ./configure --help
`configure' configures exiv2 0.22 to adapt to many kinds of systems.
Usage: ./configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included
packages
-V, --version display version information and exit
-q, --quiet, --silent do not print `checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for `--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or `..']
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data
[PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--datarootdir=DIR read-only arch.-independent data root
[PREFIX/share]
--datadir=DIR read-only architecture-independent data
[DATAROOTDIR]
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/exiv2]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
--psdir=DIR ps documentation [DOCDIR]
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as
--enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-nls do not use Native Language Support
--disable-rpath do not hardcode runtime library paths
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--disable-dependency-tracking speeds up one-time build
--disable-visibility do not use symbol visibility support
--disable-lensdata do not use the lens database for Nikon lens names
--enable-commercial compile with the EXV_COMMERCIAL_VERSION symbol set
--disable-xmp do not compile XMP support and the XMP Toolkit
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-gnu-ld assume the C compiler uses GNU ld default=no
--with-libiconv-prefix[=DIR] search for libiconv in DIR/include and
DIR/lib
--without-libiconv-prefix don't search for libiconv in includedir and
libdir
--with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
--without-libintl-prefix don't search for libintl in includedir and
libdir
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-zlib=DIR root directory path of zlib installation defaults to
/usr/local or /usr if not found in /usr/local
--without-zlib to disable zlib usage completely
--with-expat[=DIR] use libexpat in DIR
Some influential environment variables:
CXX C++ compiler command
CXXFLAGS C++ compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CXXCPP C++ preprocessor
CC C compiler command
CFLAGS C compiler flags
CPP C preprocessor
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to <ahuggel(a)gmx.net>.
simsong@FC15:~/exiv2-0.22$
simsong@FC15:~/domex/src/bulk_extractor$
And here is the command I'm using to create exiv2:
./configure --host=x86_64-w64-mingw32
--prefix=/usr/x86_64-w64-mingw32/sys-root/mingw --enable-static
--without-libiconv-prefix
Here is the usage for the exiv2 configure:
12 years, 7 months
addendum
by Simson Garfinkel
As a follow-up to my own post, I want to tell those reading that I have
looked in the .a file and the symbol is present:
simsong@FC15:~/domex/src/bulk_extractor/src$ x86_64-w64-mingw32-nm
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/libexiv2.a |grep
Exiv25Value8toStringEv U _ZNK5Exiv25Value8toStringEv
U _ZNK5Exiv25Value8toStringEv
U _ZNK5Exiv25Value8toStringEv
U _ZNK5Exiv25Value8toStringEv
U _ZNK5Exiv25Value8toStringEv
U _ZNK5Exiv25Value8toStringEv
U _ZNK5Exiv25Value8toStringEv
U _ZNK5Exiv25Value8toStringEv
U _ZNK5Exiv25Value8toStringEv
U _ZNK5Exiv25Value8toStringEv
U _ZNK5Exiv25Value8toStringEv
00000000000067b0 T _ZNK5Exiv25Value8toStringEv
U _ZNK5Exiv25Value8toStringEv
simsong@FC15:~/domex/src/bulk_extractor/src$
I find this very confusing and welcome any help.
12 years, 7 months