public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* libtool with expat, xmlwf/xmlwf target problems again
@ 2003-09-24  7:39 Gerrit P. Haase
  2003-09-24 21:12 ` Gerrit P. Haase
  0 siblings, 1 reply; 2+ messages in thread
From: Gerrit P. Haase @ 2003-09-24  7:39 UTC (permalink / raw)
  To: cygwin

Hallo Chuck,

Do you remember our talk about libtool problems when the targetname is
xmlwf/xmlwf and when the target name is also the executable name,
here: http://www.cygwin.com/ml/cygwin/2003-04/msg01283.html

I have the same problem again and I cannot remmber how I resolved it.
The Makefile.in from the latest release and the Makefile.in from the
current CVS are pretty much the same and I just relibtoolized and
compiled it with no problems.  Now I wonder how this was possible and
what is wrong now (again).

From the Makefile:

default:  buildlib xmlwf/xmlwf

buildlib: $(LIBRARY)

all: $(LIBRARY) xmlwf/xmlwf examples/elements examples/outline

From make:
sh /tmp/expat/expat-1.95.7/.obj/libtool --silent --mode=link gcc -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions   -I/tmp/expat/expat-1.95.7/lib -I.  -o xmlwf/xmlwf xmlwf/xmlwf.o xmlwf/xmlfile.o xmlwf/codepage.o xmlwf/readfilemap.o libexpat.la
/tmp/expat/expat-1.95.7/.obj/libtool: cannot create .libs/lt-xmlwf/xmlwf.c: directory nonexistent
/tmp/expat/expat-1.95.7/.obj/libtool: cannot create .libs/lt-xmlwf/xmlwf.c: directory nonexistent
/tmp/expat/expat-1.95.7/.obj/libtool: cannot create .libs/lt-xmlwf/xmlwf.c: directory nonexistent
/tmp/expat/expat-1.95.7/.obj/libtool: cannot create .libs/lt-xmlwf/xmlwf.c: directory nonexistent
/tmp/expat/expat-1.95.7/.obj/libtool: cannot create .libs/lt-xmlwf/xmlwf.c: directory nonexistent
/tmp/expat/expat-1.95.7/.obj/libtool: cannot create .libs/lt-xmlwf/xmlwf.c: directory nonexistent
ln: accessing `.libs/xmlwf/xmlwf.exe': No such file or directory


Do you have an idea what I can do to get around this?

Gerrit
-- 
=^..^=


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: libtool with expat, xmlwf/xmlwf target problems again
  2003-09-24  7:39 libtool with expat, xmlwf/xmlwf target problems again Gerrit P. Haase
@ 2003-09-24 21:12 ` Gerrit P. Haase
  0 siblings, 0 replies; 2+ messages in thread
From: Gerrit P. Haase @ 2003-09-24 21:12 UTC (permalink / raw)
  To: cygwin

Hallo Charles,

> Do you remember our talk about libtool problems when the targetname is
> xmlwf/xmlwf and when the target name is also the executable name,
> here: http://www.cygwin.com/ml/cygwin/2003-04/msg01283.html

[...]

> Do you have an idea what I can do to get around this?

I found a workaround now.  This patch includes also my usual change
which make the whole wrapper useless.  I needed it to builkd glib/gtk+
because they use libtool to create executables which are used to
generate code during the build, this didn't worked because the wrapper
doesn't produce the code and it also doesn't execute the real
executable.  This seems to be still the problem, so I just link the
real executable and get also the other problem killed with this,
libtool doesn't rebuild the executables all the time.

The first part is the more interesting, with this I can use targets
like xmlwf/xmlwf in the Makefiles and it will also work for 'normal'
targets in recursive builds since `dirname xmlwf` will return the
current path '.' where `dirname xmlwf/xmlwf` returns 'xmlwf'.

Would you be so kind to approve and test this patch so it can be
included in the real libtool distribution.  Should be no act since it
will only affect cygwin/mingw builds.  Though not tested, it should
work on mingw in the same way.

Without the second part of the patch, e.g. also make check in expat
fails since the new executable is called to run the tests.

So, for me it would work without generating the wrapper at all, but
I guess the great wrapper plan prevents such a change;-)

$ diff -udb ltmain.sh~ ltmain.sh
--- ltmain.sh~  2003-08-18 07:36:11.001000000 +0200
+++ ltmain.sh   2003-09-24 22:55:58.852886400 +0200
@@ -4481,8 +4481,10 @@
        esac
        case $host in
          *cygwin* | *mingw* )
-           cwrappersource=`$echo ${objdir}/lt-${output}.c`
-           cwrapper=`$echo ${output}.exe`
+           output_name=`basename $output`
+           output_path=`dirname $output`
+           cwrappersource=`$echo ${output_path}/${objdir}/lt-${output_name}.c`
+           cwrapper=`$echo ${output_path}/${output_name}.exe`
            $rm $cwrappersource $cwrapper
            trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15
 
@@ -4813,7 +4815,7 @@
          # are only useful if you want to execute the "real" binary.
          # Since the "real" binary is built for $host, then this
          # wrapper might as well be built for $host, too.
-         $run $LTCC -s -o $cwrapper $cwrappersource
+         $run ln ${output_path}/${objdir}/${output_name}.exe ${cwrapper}
          ;;
        esac
        $rm $output

# END OF PATCH

Gerrit
-- 
=^..^=


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-09-24 21:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-24  7:39 libtool with expat, xmlwf/xmlwf target problems again Gerrit P. Haase
2003-09-24 21:12 ` Gerrit P. Haase

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).