Re: Unable to build setup.exe: undefined reference to `_IID_IPersistFile'

2010-11-08 Thread Ken Brown

On 11/7/2010 8:18 PM, Charles Wilson wrote:

On 11/7/2010 6:41 PM, Ken Brown wrote:

-lole32 -lwsock32 -lnetapi32 /usr/lib/libuuid.a -L/lib -L/usr/lib

^^

/usr/lib/libintl.a /usr/lib/libiconv.a /usr/lib/mingw/liblzma.a -lbz2
-lz -lmingw32
mklink2.o: In function `make_link_2':
/usr/src/cygsetup/setup/mklink2.cc:32: undefined reference to
`_IID_IPersistFile'

Am I missing some library?  I've installed all the packages mentioned in
the README.


The main problem is, you're using the cygwin 4.5 compiler in its
cygwin mode to compile; this causes, among other things, to use the
/usr/lib/libuuid.a library instead of the /usr/lib/w32api/libuuid.a one
you really want.

Take a close look at the bootstrap script.  Unless you have a mingw
cross compiler installed, you probably should explicitly use 'gcc-3
-mno-cygwin' and 'g++-3 -mno-cygwin' as your CC and CXX.


The bootstrap script already sets CC and CXX this way as of Yaakov's 
changes of August 11.  You can see 'g++-3 -mno-cygwin' in the link 
command that I quoted in my original post.  There must be some other 
reason that /usr/lib/libuuid.a is used.


Here's the build command right before the one I quoted, in case it 
provides some clue:


/bin/sh ./libtool --tag=CXX   --mode=link g++-3 -mno-cygwin -Werror 
-Wall -Wno-uninitialized -Wpointer-arith -Wcomments -Wcast-align 
-Wwrite-strings -g -O2 -mwindows -Wc,-static -static-libtool-libs  -o 
setup.exe AntiVirus.o archive.o archive_tar.o archive_tar_file.o 
autoload.o choose.o compress.o compress_bz.o compress_gz.o compress_xz.o 
ConnectionSetting.o ControlAdjuster.o crypto.o cygpackage.o desktop.o 
dialog.o diskfull.o download.o Exception.o find.o FindVisitor.o 
filemanip.o fromcwd.o geturl.o gpg-packet.o ini.o IniDBBuilderPackage.o 
inilex.o iniparse.o IniParseFeedback.o IniParseFindVisitor.o install.o 
io_stream.o io_stream_cygfile.o io_stream_file.o io_stream_memory.o 
KeysSetting.o localdir.o LogFile.o LogSingleton.o main.o mkdir.o 
mklink2.o mount.o msg.o net.o netio.o nio-ie5.o nio-file.o nio-ftp.o 
nio-http.o package_db.o package_meta.o package_source.o 
package_version.o PackageSpecification.o PickCategoryLine.o 
PickPackageLine.o PickView.o postinstall.o postinstallresults.o prereq.o 
proppage.o propsheet.o res.o root.o ScanFindVisitor.o script.o 
setup_version.o simpsock.o site.o source.o SourceSetting.o splash.o 
state.o String++.o threebar.o UserSettings.o win32.o window.o 
csu_util/MD5Sum.o csu_util/rfc1738.o csu_util/version_compare.o 
libmd5-rfc/md5.o libgetopt++/libgetopt++.la -lgcrypt -lgpg-error 
-lshlwapi -lcomctl32 -lole32 -lwsock32 -lnetapi32 -luuid -llzma -lbz2 
-lz  -lmingw32


Ken


Re: Unable to build setup.exe: undefined reference to `_IID_IPersistFile'

2010-11-08 Thread Andy Koppe
On 8 November 2010 12:29, Ken Brown wrote:
 On 11/7/2010 8:18 PM, Charles Wilson wrote:

 On 11/7/2010 6:41 PM, Ken Brown wrote:

 -lole32 -lwsock32 -lnetapi32 /usr/lib/libuuid.a -L/lib -L/usr/lib

                                ^^

 /usr/lib/libintl.a /usr/lib/libiconv.a /usr/lib/mingw/liblzma.a -lbz2
 -lz -lmingw32
 mklink2.o: In function `make_link_2':
 /usr/src/cygsetup/setup/mklink2.cc:32: undefined reference to
 `_IID_IPersistFile'

 Am I missing some library?  I've installed all the packages mentioned in
 the README.

 The main problem is, you're using the cygwin 4.5 compiler in its
 cygwin mode to compile; this causes, among other things, to use the
 /usr/lib/libuuid.a library instead of the /usr/lib/w32api/libuuid.a one
 you really want.

 Take a close look at the bootstrap script.  Unless you have a mingw
 cross compiler installed, you probably should explicitly use 'gcc-3
 -mno-cygwin' and 'g++-3 -mno-cygwin' as your CC and CXX.

 The bootstrap script already sets CC and CXX this way as of Yaakov's changes
 of August 11.  You can see 'g++-3 -mno-cygwin' in the link command that I
 quoted in my original post.  There must be some other reason that
 /usr/lib/libuuid.a is used.

 Here's the build command right before the one I quoted, in case it provides
 some clue:

 /bin/sh ./libtool --tag=CXX   --mode=link g++-3 -mno-cygwin -Werror -Wall
 -Wno-uninitialized -Wpointer-arith -Wcomments -Wcast-align -Wwrite-strings
 -g -O2 -mwindows -Wc,-static -static-libtool-libs  -o setup.exe AntiVirus.o
 archive.o archive_tar.o archive_tar_file.o autoload.o choose.o compress.o
 compress_bz.o compress_gz.o compress_xz.o ConnectionSetting.o
 ControlAdjuster.o crypto.o cygpackage.o desktop.o dialog.o diskfull.o
 download.o Exception.o find.o FindVisitor.o filemanip.o fromcwd.o geturl.o
 gpg-packet.o ini.o IniDBBuilderPackage.o inilex.o iniparse.o
 IniParseFeedback.o IniParseFindVisitor.o install.o io_stream.o
 io_stream_cygfile.o io_stream_file.o io_stream_memory.o KeysSetting.o
 localdir.o LogFile.o LogSingleton.o main.o mkdir.o mklink2.o mount.o msg.o
 net.o netio.o nio-ie5.o nio-file.o nio-ftp.o nio-http.o package_db.o
 package_meta.o package_source.o package_version.o PackageSpecification.o
 PickCategoryLine.o PickPackageLine.o PickView.o postinstall.o
 postinstallresults.o prereq.o proppage.o propsheet.o res.o root.o
 ScanFindVisitor.o script.o setup_version.o simpsock.o site.o source.o
 SourceSetting.o splash.o state.o String++.o threebar.o UserSettings.o
 win32.o window.o csu_util/MD5Sum.o csu_util/rfc1738.o
 csu_util/version_compare.o libmd5-rfc/md5.o libgetopt++/libgetopt++.la
 -lgcrypt -lgpg-error -lshlwapi -lcomctl32 -lole32 -lwsock32 -lnetapi32
 -luuid -llzma -lbz2 -lz  -lmingw32

It's due to a name clash between the unrelated libuuid and UUID.DLL.
It's aiming for /usr/lib/w32api/libuuid.a rather than
/usr/lib/libuuid.a. The workaround is to uninstall libuuid-devel. See
also http://www.cygwin.com/ml/cygwin/2010-06/msg00601.html.

Andy


Re: Unable to build setup.exe: undefined reference to `_IID_IPersistFile'

2010-11-08 Thread Charles Wilson
On 11/8/2010 7:45 AM, Andy Koppe wrote:
 On 8 November 2010 12:29, Ken Brown wrote:
 You can see 'g++-3 -mno-cygwin' in the link command that I
 quoted in my original post.

You're right. Sorry for the confusion.

  There must be some other reason that
 /usr/lib/libuuid.a is used.

 
 It's due to a name clash between the unrelated libuuid and UUID.DLL.
 It's aiming for /usr/lib/w32api/libuuid.a rather than
 /usr/lib/libuuid.a. The workaround is to uninstall libuuid-devel. See
 also http://www.cygwin.com/ml/cygwin/2010-06/msg00601.html.

...and Andy's correct.  This is a (long-standing) problem with the
-mno-cygwin mode: it tends to mix cygwin libs in /usr/lib and the
native ones in /usr/lib/w32api/ together (which is very bad).  The
cross compiler setups do not have this problem (but, AFAIK, the
mingw64-* based cross compilers aren't official supported for building
setup.exe...which means we(*) need to get off the stick and publish a
mingw.org-based cross compiler soon).

If you want to use gcc-3, then the two workarounds are, as Andy
suggests, to uninstall libuuid-devel, or to modify the
Makefile[|.in|.am] that specifies -luuid and explicitly refer to
/usr/lib/w32api/libuuid.a instead.


(*) For various values of we.

--
Chuck


Unable to build setup.exe: undefined reference to `_IID_IPersistFile'

2010-11-07 Thread Ken Brown
I've downloaded the cvs sources for setup.exe and run ./bootstrap.sh and 
make, but the build fails as follows:


libtool: link: g++-3 -mno-cygwin -Werror -Wall -Wno-uninitialized 
-Wpointer-arith -Wcomments -Wcast-align -Wwrite-strings -g -O2 -mwindows 
-static -o setup.exe AntiVirus.o archive.o archive_tar.o 
archive_tar_file.o autoload.o choose.o compress.o compress_bz.o 
compress_gz.o compress_xz.o ConnectionSetting.o ControlAdjuster.o 
crypto.o cygpackage.o desktop.o dialog.o diskfull.o download.o 
Exception.o find.o FindVisitor.o filemanip.o fromcwd.o geturl.o 
gpg-packet.o ini.o IniDBBuilderPackage.o inilex.o iniparse.o 
IniParseFeedback.o IniParseFindVisitor.o install.o io_stream.o 
io_stream_cygfile.o io_stream_file.o io_stream_memory.o KeysSetting.o 
localdir.o LogFile.o LogSingleton.o main.o mkdir.o mklink2.o mount.o 
msg.o net.o netio.o nio-ie5.o nio-file.o nio-ftp.o nio-http.o 
package_db.o package_meta.o package_source.o package_version.o 
PackageSpecification.o PickCategoryLine.o PickPackageLine.o PickView.o 
postinstall.o postinstallresults.o prereq.o proppage.o propsheet.o res.o 
root.o ScanFindVisitor.o script.o setup_version.o simpsock.o site.o 
source.o SourceSetting.o splash.o state.o String++.o threebar.o 
UserSettings.o win32.o window.o csu_util/MD5Sum.o csu_util/rfc1738.o 
csu_util/version_compare.o libmd5-rfc/md5.o 
libgetopt++/.libs/libgetopt++.a /usr/lib/mingw/libgcrypt.a 
-L/usr/lib/mingw /usr/lib/mingw/libgpg-error.a -lshlwapi -lcomctl32 
-lole32 -lwsock32 -lnetapi32 /usr/lib/libuuid.a -L/lib -L/usr/lib 
/usr/lib/libintl.a /usr/lib/libiconv.a /usr/lib/mingw/liblzma.a -lbz2 
-lz -lmingw32

mklink2.o: In function `make_link_2':
/usr/src/cygsetup/setup/mklink2.cc:32: undefined reference to 
`_IID_IPersistFile'


Am I missing some library?  I've installed all the packages mentioned in 
the README.


Thanks for any help.

Ken


Re: Unable to build setup.exe: undefined reference to `_IID_IPersistFile'

2010-11-07 Thread Charles Wilson
On 11/7/2010 6:41 PM, Ken Brown wrote:
 -lole32 -lwsock32 -lnetapi32 /usr/lib/libuuid.a -L/lib -L/usr/lib
   ^^
 /usr/lib/libintl.a /usr/lib/libiconv.a /usr/lib/mingw/liblzma.a -lbz2
 -lz -lmingw32
 mklink2.o: In function `make_link_2':
 /usr/src/cygsetup/setup/mklink2.cc:32: undefined reference to
 `_IID_IPersistFile'
 
 Am I missing some library?  I've installed all the packages mentioned in
 the README.

The main problem is, you're using the cygwin 4.5 compiler in its
cygwin mode to compile; this causes, among other things, to use the
/usr/lib/libuuid.a library instead of the /usr/lib/w32api/libuuid.a one
you really want.

Take a close look at the bootstrap script.  Unless you have a mingw
cross compiler installed, you probably should explicitly use 'gcc-3
-mno-cygwin' and 'g++-3 -mno-cygwin' as your CC and CXX.

--
Chuck