Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiling three deep modules within ext/ #57

Closed
p5pRT opened this issue Jun 12, 1999 · 1 comment
Closed

compiling three deep modules within ext/ #57

p5pRT opened this issue Jun 12, 1999 · 1 comment

Comments

@p5pRT
Copy link

p5pRT commented Jun 12, 1999

Migrated from rt.perl.org#859 (status was 'resolved')

Searchable as RT859$

@p5pRT
Copy link
Author

p5pRT commented Jun 12, 1999

From nate@valleytel.net

Perl currently does not automatically compile extension modules put
under PERL_SRC/ext/ if the module has more than two layers of depth
before the .xs file. For example, Configure does not find
"ext/XML/Parser/Expat" and thus does not compile it. The following
patch should help to fix this.

This patch is against the Configure distributed with 5.00554, but I
assume that it should work against the current version as well. Note
that even with this patch, MakeMaker will still give a spurious error
message. It can safely be ignored, and probably could be fixed most
easily by passing PERL_SRC to ext/util/make_ext in Makefile.SH.

I'm guessing the patch is as portable as the rest of Configure, but if
it is not I suppose one could ditch the recursion and just add another
couple layers of checking by brute force.

Hope this is useful,

--nate

Inline Patch
--- Configure	Fri Jun 11 20:59:48 1999
+++ Configure.new	Fri Jun 11 21:06:43 1999
@@ -12010,8 +12010,6 @@
 
 echo " "
 echo "Looking for extensions..." >&4
-tdir=`pwd`
-cd $rsrc/ext
 : If we are using the old config.sh, known_extensions may contain
 : old or inaccurate or duplicate values.
 known_extensions=''
@@ -12020,30 +12018,33 @@
 : We do not just use MANIFEST because the user may have dropped
 : some additional extensions into the source tree and expect them
 : to be built.
-for xxx in * ; do
-	case "$xxx" in
-	DynaLoader|dynaload) ;;
-	*)	if $test -f $xxx/$xxx.xs; then
-			known_extensions="$known_extensions $xxx"
-		elif $test -f $xxx/Makefile.PL; then
-			nonxs_extensions="$nonxs_extensions $xxx"
-		else
-			if $test -d $xxx; then
-				# Look for nested extensions, eg. Devel/Dprof.
-				cd $xxx
-				for yyy in * ; do
-				if $test -f $yyy/$yyy.xs; then
-					known_extensions="$known_extensions $xxx/$yyy"
-				elif $test -f $yyy/Makefile.PL; then
-					nonxs_extensions="$nonxs_extensions $xxx/$yyy"
-				fi
-				done
-				cd ..
-			fi
-		fi 
-		;;
+: function to recursively find available extensions, ignoring DynaLoader
+: NOTE: recursion limit of 10 to prevent runaway in case of symlink madness
+find_extensions='
+    for xxx in *; do
+   	case "$xxx" in
+	    DynaLoader|dynaload) ;;
+	    *)
+	    if $test -f $xxx/$xxx.xs; then
+		known_extensions="$known_extensions $1$xxx";
+	    elif $test -f $xxx/Makefile.PL; then
+		nonxs_extensions="$nonxs_extensions $1$xxx";
+	    else
+		if $test -d $xxx -a $# -lt 10; then
+		    set $1$xxx/ $*;
+		    cd $xxx;
+		    eval $find_extensions;
+		    cd ..;
+		    shift;
+		fi
+	    fi
+	    ;;
 	esac
-done
+    done'
+tdir=`pwd`
+cd $rsrc/ext
+set --
+eval $find_extensions
 set X $nonxs_extensions
 shift
 nonxs_extensions="$*"
Perl Info


This perlbug was built using Perl 5.00554 - Mon Apr  5 17:08:35 CDT 1999
It is being executed now by  Perl 5.00502 - Fri Oct 23 19:20:09 EDT 1998.

Site configuration information for perl 5.00502:

Configured by nate at Fri Oct 23 19:20:09 EDT 1998.

Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration:
  Platform:
    osname=linux, osvers=2.0.35, archname=i586-linux
    uname='linux trinkpad 2.0.35 #3 thu oct 22 19:19:19 edt 1998 i586 unknown '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
    cc='cc', optimize='-O2', gccversion=egcs-2.90.29 980515 (egcs-1.0.3 release)
    cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include'
    ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /shlib /lib /usr/lib
    libs=-lndbm -lgdbm -ldbm -ldb -ldl -lm -lc
    libc=/lib/libc.so.5.4.44, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    


@INC for perl 5.00502:
    /usr/lib/perl5/5.00502/i586-linux
    /usr/lib/perl5/5.00502
    /usr/lib/perl5/site_perl/5.005/i586-linux
    /usr/lib/perl5/site_perl/5.005
    .


Environment for perl 5.00502:
    HOME=/home/nate
    LANG (unset)
    LD_LIBRARY_PATH=/usr/local/qt/lib::/usr/local/rvplayer5.0
    LOGDIR (unset)
    PATH=/usr/local/qt/bin:/usr/local/qt/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/andrew/bin:/usr/openwin/bin:/usr/games:.:/usr/lib/teTeX/bin:/usr/X11R6/bin:/sbin:/usr/sbin:/usr/local/etc/java/bin:/usr/local/netpbm/bin:/usr/local/insure/bin.linux:/usr/X11R6/bin:/usr/andrew/bin:/usr/openwin/bin:/usr/games:.:/usr/lib/teTeX/bin:/usr/X11R6/bin:/sbin:/usr/sbin:/usr/local/etc/java/bin:/usr/local/netpbm/bin:/usr/local/insure/bin.linux
    PERL_BADLANG (unset)
    SHELL=/bin/bash









@p5pRT p5pRT closed this as completed Nov 28, 2003
jkeenan pushed a commit that referenced this issue Aug 28, 2024
  2.213 28 August 2024

      * version 2.213
        Wed Aug 28 16:06:42 2024 +0100
        020520f78490bf1a6b7351febd16fc19f351ddfe

      * add perl5.40 to workflows
        Sun Jun 16 16:56:37 2024 +0100
        6d7dd85763f7cd0894a890208156187b8cac6597

      * #57 Add stub moduile IO/Compress.pm
        Sat May 25 08:53:57 2024 +0100
        c6a05a69d62b8169d482d1b30a333b0cec4f5a06
rawleyfowler pushed a commit to rawleyfowler/perl5 that referenced this issue Sep 2, 2024
  2.213 28 August 2024

      * version 2.213
        Wed Aug 28 16:06:42 2024 +0100
        020520f78490bf1a6b7351febd16fc19f351ddfe

      * add perl5.40 to workflows
        Sun Jun 16 16:56:37 2024 +0100
        6d7dd85763f7cd0894a890208156187b8cac6597

      * Perl#57 Add stub moduile IO/Compress.pm
        Sat May 25 08:53:57 2024 +0100
        c6a05a69d62b8169d482d1b30a333b0cec4f5a06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant