public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Problems compiling Perl
@ 1998-10-22 20:28 john_r_velman
  1998-10-24  3:21 ` Mumit Khan
  0 siblings, 1 reply; 4+ messages in thread
From: john_r_velman @ 1998-10-22 20:28 UTC (permalink / raw)
  To: gnu-win32

First let me say I'm not basically a developer.  I use make files that
someone else has put together, but don't create them myself, for
example. When I try to build a complex package I only know vaguely
what I'm doing and count on the instructions to work.  ;-)

Following up on a threat :-) I made a few days ago I down-loaded the
latest_tar.gz perl source and set out to compile it.  My environment
is NT4Sp3, gcc version egcs-2.91.57 19980901 (egcs-1.1 release), and
from uname, version 19.3 of cygwin32.  My entire development and
working tree is within a single C:\xx\xx\ directory, mounted binary as /.
I've moved executables, libraries, include file (and everything else)
into a unix/linux like directory structure.  (/bin, /usr/bin,
/usr/include, /usr/local/ etc.).  I'm using Michael Hirmke's April
version of Vim for any file editing involved in making this work.

So much for background.  Some problems I had -- following the cygwin
32 instructions that came with the perl release.  I got around most of
them, but..

1.  Running Configure, it only stopped at every other question.  This
is reported to happen on win95/98, but not on NT.  I have NT.  It
happened.  I followed the alternative procedure of putting in the
hint/ suggestion for config.sh, manually editing it.  (It didn't seem
to have nearly enough questions.)  Then I ran sh Configure -d (non
interactive version).  

2. When I tried running make, I found that the make files had
pathnames of the form C:\\xxx\\xxx\\xx  instead of /bin, /usr/include,
and so on, as intended.  
*** Make (or gcc or?) couldn't find these files***
I edited appropriate GNUMakefile files to replace all C:'s with//c's,
and all \\ with /.  Now (a lot of it) worked.

3. Eventually, when it tried to call gcc thru gcc2 (a shell script
wrapper that comes with the perl distribution for use with cyg-win),
the path built into gcc2 turned out to be wrong. Fixed that, and got
by that step.

4. During my edit sessions, vim sometimes hung.  Somehow, key strokes
were not getting to vim, or in some cases, even to the window (i.e.,
bash wouldn't respond after killing vim from bash running in another
window).  This clearly is not a problem with the perl distribution,
but this is the first time I had this problem that I recall.  (By the
way, I have TERM=linux; I don't have tty set in CYGWIN since, when I
do, nothing that uses curses works right.)

5. OK.  I finally got it to compile.  There seems to be a working perl.
At least it processes a perl file with a single print statement
correctly.

6. Finally, we come to compiling the extensions.  There we have a hang
up I can't seem to resolve.   Here is the output from make that
bombed:

----
        Making B (dynamic)
LD_RUN_PATH="" ld2 -o ../../lib/auto/B/B.dll  -L/usr/local/lib B.o
gcc -c fixup.c
gcc -c init.cc
echo EXPORTS > B.def
nm B.o  init.o fixup.o | grep '^........ [TCD] _' | sed 's/[^_]*_//' >> B.def
ld --base-file B.base --dll -o B.dll B.o  init.o fixup.o -L/usr/local/lib -e _dl
l_entry@12
B.o(.text+0x16d):B.c: undefined reference to `__imp_Perl_opargs'
B.o(.text+0x2ec):B.c: undefined reference to `__imp_Perl_op_name'
B.o(.text+0x2f9):B.c: undefined reference to `Perl_warn'

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

* Re: Problems compiling Perl
  1998-10-22 20:28 Problems compiling Perl john_r_velman
@ 1998-10-24  3:21 ` Mumit Khan
  0 siblings, 0 replies; 4+ messages in thread
From: Mumit Khan @ 1998-10-24  3:21 UTC (permalink / raw)
  To: john_r_velman; +Cc: gnu-win32

On Thu, 22 Oct 1998 john_r_velman@mail.hac.com wrote:
> 
> 1.  Running Configure, it only stopped at every other question.  This
> is reported to happen on win95/98, but not on NT.  I have NT.  It
> happened.  I followed the alternative procedure of putting in the
> hint/ suggestion for config.sh, manually editing it.  (It didn't seem
> to have nearly enough questions.)  Then I ran sh Configure -d (non
> interactive version).  

Does adding tty to CYGWIN32 variable help?
  
  $ export CYGWIN32="$CYGWIN32 tty"
  $ ./Configure [ ... ]

> 
> 2. When I tried running make, I found that the make files had
> pathnames of the form C:\\xxx\\xxx\\xx  instead of /bin, /usr/include,
> and so on, as intended.  
> *** Make (or gcc or?) couldn't find these files***
> I edited appropriate GNUMakefile files to replace all C:'s with//c's,
> and all \\ with /.  Now (a lot of it) worked.

Yeah, this is bad. GCC convert pathnames to native format and that
screws up make.

How about this patch to makedepend.SH? (beware: untested)

Fri Oct 23 22:39:06 1998  Mumit Khan  <khan@xraylith.wisc.edu>

	* makedepend.SH: Convert dependency filenames to posix path.

--- makedepend.SH.org	Fri Oct 23 22:36:16 1998
+++ makedepend.SH	Fri Oct 23 22:37:42 1998
@@ -98,6 +98,11 @@ $MAKE clist || ($echo "Searching for .c 
 	$echo *.c | $tr ' ' $trnl | $egrep -v '\*' >.clist)
 for file in `$cat .clist`; do
 # for file in `cat /dev/null`; do
+	if [ "$osname" = cygwin32 ]; then
+		cygwin32fix="-e s,\\\\\\\\,/,g -e s,\\([a-zA-Z]\\):/,/\\1/,g"
+	else
+		cygwin32fix=
+	fi
     case "$file" in
     *.c) filebase=`basename $file .c` ;;
     *.y) filebase=`basename $file .y` ;;
@@ -126,7 +131,7 @@ for file in `$cat .clist`; do
 	-e 's/^.*"\(.*\)".*$/'$filebase'\$(OBJ_EXT): \1/' \
 	-e 's/^# *[0-9][0-9]* \(.*\)$/'$filebase'\$(OBJ_EXT): \1/' \
 	-e 's|: \./|: |' \
-	-e 's|\.c\.c|.c|' | \
+	-e 's|\.c\.c|.c|' $cygwin32fix | \
     $uniq | $sort | $uniq >> .deptmp
 done
 

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

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

* Re: Problems compiling Perl
@ 1998-10-24 20:44 Earnie Boyd
  1998-10-24 19:59 ` Mumit Khan
  0 siblings, 1 reply; 4+ messages in thread
From: Earnie Boyd @ 1998-10-24 20:44 UTC (permalink / raw)
  To: Mumit Khan, john_r_velman; +Cc: gnu-win32

---Mumit Khan <khan@xraylith.wisc.edu> wrote:
>
> On Thu, 22 Oct 1998 john_r_velman@mail.hac.com wrote:
> > 
> > 1.  Running Configure, it only stopped at every other question. 
This
> > is reported to happen on win95/98, but not on NT.  I have NT.  It
> > happened.  I followed the alternative procedure of putting in the
> > hint/ suggestion for config.sh, manually editing it.  (It didn't
seem
> > to have nearly enough questions.)  Then I ran sh Configure -d (non
> > interactive version).  
> 
> Does adding tty to CYGWIN32 variable help?
>   
>   $ export CYGWIN32="$CYGWIN32 tty"
>   $ ./Configure [ ... ]
> 

You must `SET CYGWIN32=%CYGWIN32% tty' before starting bash.  Setting
tty after starting bash will leave the parent process in notty and the
child in tty and you can get some strange results this way.

==
-                  \\||//
-------------o0O0--Earnie--0O0o--------------
--          earnie_boyd@yahoo.com          --
-- http://www.freeyellow.com/members5/gw32 --
----------------ooo0O--O0ooo-----------------

PS: Newbie's, you should visit my page.
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

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

* Re: Problems compiling Perl
  1998-10-24 20:44 Earnie Boyd
@ 1998-10-24 19:59 ` Mumit Khan
  0 siblings, 0 replies; 4+ messages in thread
From: Mumit Khan @ 1998-10-24 19:59 UTC (permalink / raw)
  To: earnie_boyd; +Cc: john_r_velman, gnu-win32

I had written,
> > 
> > Does adding tty to CYGWIN32 variable help?
> >   
> >   $ export CYGWIN32="$CYGWIN32 tty"
> >   $ ./Configure [ ... ]
> > 

And, Earnie Boyd <earnie_boyd@yahoo.com> writes:
> 
> You must `SET CYGWIN32=%CYGWIN32% tty' before starting bash.  Setting
> tty after starting bash will leave the parent process in notty and the
> child in tty and you can get some strange results this way.
> 
> ==

Thanks for the correction Earnie!

Regards,
Mumit
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

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

end of thread, other threads:[~1998-10-24 20:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-22 20:28 Problems compiling Perl john_r_velman
1998-10-24  3:21 ` Mumit Khan
1998-10-24 20:44 Earnie Boyd
1998-10-24 19:59 ` Mumit Khan

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).