syntax error ... near compile qw(:common)
Hello, When I try to start up Apache, I get the error: [error] syntax error at /usr/lib/perl5/site_perl/5.8.0/ProMP3.pm line 8, near compile qw(:common) Compilation failed in require at /etc/httpd/promp3/promp3.handler.pl line 6. BEGIN failed--compilation aborted at /etc/httpd/promp3/promp3.handler.pl line 6. Compilation failed in require at (eval 1) line 1. ProMP3.pm's has: use Apache2 (); use Apache::compat; use Apache::ServerUtil (); use strict; use vars qw($VERSION); use DBI; use Apache::Const -compile qw(:common); What do I need to do differently? Thanks, Harold signature.asc Description: This is a digitally signed message part
Re: syntax error ... near compile qw(:common)
Harold Martin wrote: Hello, When I try to start up Apache, I get the error: [error] syntax error at /usr/lib/perl5/site_perl/5.8.0/ProMP3.pm line 8, near compile qw(:common) Compilation failed in require at /etc/httpd/promp3/promp3.handler.pl line 6. BEGIN failed--compilation aborted at /etc/httpd/promp3/promp3.handler.pl line 6. Compilation failed in require at (eval 1) line 1. ProMP3.pm's has: use Apache2 (); use Apache::compat; use Apache::ServerUtil (); use strict; use vars qw($VERSION); use DBI; use Apache::Const -compile qw(:common); where did you find an example of this? It should be: use Apache::Const -compile = qw(:common); or: use Apache::Const -compile, qw(:common); __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: syntax error ... near compile qw(:common)
On Sun, 2003-08-24 at 17:21, Stas Bekman wrote: Harold Martin wrote: Hello, When I try to start up Apache, I get the error: [error] syntax error at /usr/lib/perl5/site_perl/5.8.0/ProMP3.pm line 8, near compile qw(:common) Compilation failed in require at /etc/httpd/promp3/promp3.handler.pl line 6. BEGIN failed--compilation aborted at /etc/httpd/promp3/promp3.handler.pl line 6. Compilation failed in require at (eval 1) line 1. ProMP3.pm's has: use Apache2 (); use Apache::compat; use Apache::ServerUtil (); use strict; use vars qw($VERSION); use DBI; use Apache::Const -compile qw(:common); where did you find an example of this? It should be: use Apache::Const -compile = qw(:common); or: use Apache::Const -compile, qw(:common); The form I used is from the Apache::Const page http://perl.apache.org/docs/2.0/api/Apache/Const.html#C__common_ Using either of the two other lines results in the error: [error] Can't locate # in @INC ... What's that all about? Thanks, Harold signature.asc Description: This is a digitally signed message part
Re: syntax error ... near compile qw(:common)
Harold Martin wrote: On Sun, 2003-08-24 at 17:21, Stas Bekman wrote: Harold Martin wrote: Hello, When I try to start up Apache, I get the error: [error] syntax error at /usr/lib/perl5/site_perl/5.8.0/ProMP3.pm line 8, near compile qw(:common) Compilation failed in require at /etc/httpd/promp3/promp3.handler.pl line 6. BEGIN failed--compilation aborted at /etc/httpd/promp3/promp3.handler.pl line 6. Compilation failed in require at (eval 1) line 1. ProMP3.pm's has: use Apache2 (); use Apache::compat; use Apache::ServerUtil (); use strict; use vars qw($VERSION); use DBI; use Apache::Const -compile qw(:common); where did you find an example of this? It should be: use Apache::Const -compile = qw(:common); or: use Apache::Const -compile, qw(:common); The form I used is from the Apache::Const page http://perl.apache.org/docs/2.0/api/Apache/Const.html#C__common_ Ah thank you, I've fixed that. Using either of the two other lines results in the error: [error] Can't locate # in @INC ... What's that all about? Please post a short test example and a full error message as a part of a proper bug report as explained here: http://perl.apache.org/bugs/ Thanks. __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: syntax error ... near compile qw(:common)
On Sun, 2003-08-24 at 18:12, Stas Bekman wrote: Harold Martin wrote: On Sun, 2003-08-24 at 17:21, Stas Bekman wrote: Harold Martin wrote: Hello, When I try to start up Apache, I get the error: [error] syntax error at /usr/lib/perl5/site_perl/5.8.0/ProMP3.pm line 8, near compile qw(:common) Compilation failed in require at /etc/httpd/promp3/promp3.handler.pl line 6. BEGIN failed--compilation aborted at /etc/httpd/promp3/promp3.handler.pl line 6. Compilation failed in require at (eval 1) line 1. ProMP3.pm's has: use Apache2 (); use Apache::compat; use Apache::ServerUtil (); use strict; use vars qw($VERSION); use DBI; use Apache::Const -compile qw(:common); where did you find an example of this? It should be: use Apache::Const -compile = qw(:common); or: use Apache::Const -compile, qw(:common); The form I used is from the Apache::Const page http://perl.apache.org/docs/2.0/api/Apache/Const.html#C__common_ Ah thank you, I've fixed that. Using either of the two other lines results in the error: [error] Can't locate # in @INC ... What's that all about? Please post a short test example and a full error message as a part of a proper bug report as explained here: http://perl.apache.org/bugs/ Is there any other way to figure what's wrong? The code isn't mine, but someone else's, so I'm really not a whole lot of use there. As for posting an example, it's the same as from http://sourceforge.net/project/showfiles.php?group_id=12829 but just modified slightly according to the porting guidelines. I've only changed and added a few use statements and changed the constants from the m_p 1 form to the m_p 2 from. I've attached the two pieces of code that I modified (the module and the handler) for you. Thanks, Harold package ProMP3::Config; use strict; use Apache2 (); use Apache::compat; use Apache::ServerUtil (); use ProMP3; my $config; ## ## ## config file for ProMP3 ## ## Edit the defaults below if you would like some customization ## ## # set the mp3 player to play from the server (must be installed) $config-{mp3_player} = Xmms; # valid entries are Xmms for now # set the database to use in the back end: $config-{database} = Mysql; # again, one valid choice: Mysql # set database username: $config-{database_username} = root; # set database password: $config-{database_secret} = youreouronlyhope; # set database to use within the database: # this will match what you tell (told) utils/promp3_setup.pl $config-{database_db} = music; # turn on debug, this puts a lot of stuff into the apache error log... $config-{debug} = 1; # Access lists -- set who can do what: # # The following are comma seperated access lists of ip addresses. # They can be in the following form: # ip[subnet] # i.e.: # 10.1.1.1/24 (allows 10.1.1.0 thru 10.1.1.255) # 10.1.1.1/255.255.255.0 (same) # 10.1.1.0 - 10.1.1.255 (same) # 10.1.1.50 (only this host, /32 is implied) # # They can be mixed and matched in the same string # for example: #10.1.1.1/24, 192.168.10.48/28, 192.168.10.119, 10.250.1.13-10.250.1.18 # allows 10.1.1.0 thru 10.1.1.255 and #192.168.10.48 thru 192.168.10.63 and #192.168.10.119 and #10.250.1.13 thru 10.250.1.18 # Enable streaming mp3, only these IP's will be allowed to stream : $config-{allow_stream} = 10.10.10.0/24; # Enable mp3 playing from the server, only these IP's will be able to control the server : $config-{allow_player} = 10.10.10.1-10.10.10.9, 10.10.10.11-10.10.10.200; # Allow these folks in, if they aren't in the other list, they'll just be able to look but not touch. $config-{allow_view} = 0.0.0.0/0; ### ## ## That's all you need to set... ## ### my @values = qw(allow_stream allow_player allow_view mp3_player database database_username database_secret database_db debug); foreach my $key (keys %$config) { unless (grep /^$key$/, @values) { delete $config-{$key}; print Warning: $key is being ignored in the promp3 config file\n; } } foreach my $key (@values) { if (! exists $config-{$key}) { print Warning: $key is not defined in the promp3 config file\n; $config-{$key} = undef; } } foreach my $section (qw(allow_stream allow_player allow_view) ) { (my $allow = $config-{$section})=~s/\s+//g; my @allow = split ',', $allow; delete $config-{$section}; foreach my $string (@allow) { push @{$config-{$section}}, ProMP3::set_ip_range($string); if (! defined $config-{$section}[$#{$config-{$section}}]) { pop @{$config-{$section}}; } } } sub get_config { return $config-{$_[0]} if (@_); return $config; } 1; package ProMP3; use Apache2 (); use Apache::compat; use Apache::ServerUtil (); use strict; use vars qw($VERSION); use DBI; #use Apache::Const -compile qw(:common); #use Apache::Const -compile = qw(:common); use Apache::Const -compile,
Re: syntax error ... near compile qw(:common)
Harold Martin wrote: On Sun, 2003-08-24 at 18:12, Stas Bekman wrote: Harold Martin wrote: On Sun, 2003-08-24 at 17:21, Stas Bekman wrote: Harold Martin wrote: Hello, When I try to start up Apache, I get the error: [error] syntax error at /usr/lib/perl5/site_perl/5.8.0/ProMP3.pm line 8, near compile qw(:common) Compilation failed in require at /etc/httpd/promp3/promp3.handler.pl line 6. BEGIN failed--compilation aborted at /etc/httpd/promp3/promp3.handler.pl line 6. Compilation failed in require at (eval 1) line 1. ProMP3.pm's has: use Apache2 (); use Apache::compat; use Apache::ServerUtil (); use strict; use vars qw($VERSION); use DBI; use Apache::Const -compile qw(:common); where did you find an example of this? It should be: use Apache::Const -compile = qw(:common); or: use Apache::Const -compile, qw(:common); The form I used is from the Apache::Const page http://perl.apache.org/docs/2.0/api/Apache/Const.html#C__common_ Ah thank you, I've fixed that. Using either of the two other lines results in the error: [error] Can't locate # in @INC ... What's that all about? Please post a short test example and a full error message as a part of a proper bug report as explained here: http://perl.apache.org/bugs/ Is there any other way to figure what's wrong? The code isn't mine, but someone else's, so I'm really not a whole lot of use there. As for posting an example, it's the same as from http://sourceforge.net/project/showfiles.php?group_id=12829 but just modified slightly according to the porting guidelines. I've only changed and added a few use statements and changed the constants from the m_p 1 form to the m_p 2 from. I've attached the two pieces of code that I modified (the module and the handler) for you. Sorry Harold, it doesn't work this way. You ask for help, I ask you for the additional details as described at http://perl.apache.org/bugs/, instead you dump on us 80k of code. I understand that you may not be able to write a short script since you aren't familiar with that code, but at least sending the output of t/REPORT is the least you have to do. Nevertheless I did try the attached files and I can't reproduce this problem with the latest cvs. Try upgrading your mod_perl to the latest cvs version, I have no idea which version you have. One thing that for sure is wrong with that code is that you either use 'Apache::compat' and you don't replace Apache::Constants with Apache::Const, or you don't use 'Apache::compat' and then in addition to what you have added (i.e. use Apache::Const -compile = qw(:common);), you need to s/Apache::Constants/Apache::Const/g in the code. __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: syntax error ... near compile qw(:common)
On Sun, 2003-08-24 at 19:46, Stas Bekman wrote: Harold Martin wrote: On Sun, 2003-08-24 at 18:12, Stas Bekman wrote: Harold Martin wrote: On Sun, 2003-08-24 at 17:21, Stas Bekman wrote: Harold Martin wrote: Hello, When I try to start up Apache, I get the error: [error] syntax error at /usr/lib/perl5/site_perl/5.8.0/ProMP3.pm line 8, near compile qw(:common) Compilation failed in require at /etc/httpd/promp3/promp3.handler.pl line 6. BEGIN failed--compilation aborted at /etc/httpd/promp3/promp3.handler.pl line 6. Compilation failed in require at (eval 1) line 1. ProMP3.pm's has: use Apache2 (); use Apache::compat; use Apache::ServerUtil (); use strict; use vars qw($VERSION); use DBI; use Apache::Const -compile qw(:common); where did you find an example of this? It should be: use Apache::Const -compile = qw(:common); or: use Apache::Const -compile, qw(:common); The form I used is from the Apache::Const page http://perl.apache.org/docs/2.0/api/Apache/Const.html#C__common_ Ah thank you, I've fixed that. Using either of the two other lines results in the error: [error] Can't locate # in @INC ... What's that all about? Please post a short test example and a full error message as a part of a proper bug report as explained here: http://perl.apache.org/bugs/ Is there any other way to figure what's wrong? The code isn't mine, but someone else's, so I'm really not a whole lot of use there. As for posting an example, it's the same as from http://sourceforge.net/project/showfiles.php?group_id=12829 but just modified slightly according to the porting guidelines. I've only changed and added a few use statements and changed the constants from the m_p 1 form to the m_p 2 from. I've attached the two pieces of code that I modified (the module and the handler) for you. Sorry Harold, it doesn't work this way. You ask for help, I ask you for the additional details as described at http://perl.apache.org/bugs/, instead you dump on us 80k of code. Sorry, I attached the code but my mail program must've converted it into inline text. I understand that you may not be able to write a short script since you aren't familiar with that code, but at least sending the output of t/REPORT is the least you have to do. Output of mp2bug it *attached* to this message (if it includes it inline again I'll email the developers). Nevertheless I did try the attached files and I can't reproduce this problem with the latest cvs. Try upgrading your mod_perl to the latest cvs version, I have no idea which version you have. I'll use that ASAP. One thing that for sure is wrong with that code is that you either use 'Apache::compat' and you don't replace Apache::Constants with Apache::Const, or you don't use 'Apache::compat' and then in addition to what you have added (i.e. use Apache::Const -compile = qw(:common);), you need to s/Apache::Constants/Apache::Const/g in the code. Done and done. Still getting the same errors as before. Thanks, Harold -8-- Start Bug Report 8-- 1. Problem Description: [DESCRIBE THE PROBLEM HERE] 2. Used Components and their Configuration: *** using /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/Apache/BuildConfig.pm *** Makefile.PL options: MP_APXS= /usr/sbin/apxs MP_COMPAT_1X = 1 MP_GENERATE_XS = 1 MP_LIBNAME = mod_perl MP_USE_DSO = 1 MP_USE_STATIC = 1 *** /usr/sbin/httpd -V Server version: Apache/2.0.46 Server built: Aug 6 2003 11:24:31 Server's Module Magic Number: 20020903:3 Architecture: 32-bit Server compiled with -D APACHE_MPM_DIR=server/mpm/prefork -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses disabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT=/etc/httpd -D SUEXEC_BIN=/usr/sbin/suexec -D DEFAULT_PIDLOG=logs/httpd.pid -D DEFAULT_SCOREBOARD=logs/apache_runtime_status -D DEFAULT_LOCKFILE=logs/accept.lock -D DEFAULT_ERRORLOG=logs/error_log -D AP_TYPES_CONFIG_FILE=conf/mime.types -D SERVER_CONFIG_FILE=conf/httpd.conf *** /usr/bin/perl -V Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration: Platform: osname=linux, osvers=2.4.21-1.1931.2.291.entbigmem, archname=i386-linux-thread-multi uname='linux por' config_args='-des -Doptimize=-O2 -g -pipe -march=i386 -mcpu=i686 -Dmyhostname=localhost [EMAIL PROTECTED] -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Dotherlibdirs=/usr/lib/perl5/5.8.0 -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005
Re: syntax error ... near compile qw(:common)
Harold Martin wrote: [...] Sorry Harold, it doesn't work this way. You ask for help, I ask you for the additional details as described at http://perl.apache.org/bugs/, instead you dump on us 80k of code. Sorry, I attached the code but my mail program must've converted it into inline text. No, no, it was attached just fine. By 'dumping' I meant that we need a simple short code sample if possible. Reviewing 80k of code is not an option, unless we can reproduce the problem easily, which wasn't the case. Probably getting you to use the latest cvs will make it easier to have a similar env. I understand that you may not be able to write a short script since you aren't familiar with that code, but at least sending the output of t/REPORT is the least you have to do. Output of mp2bug it *attached* to this message (if it includes it inline again I'll email the developers). Much better, however unfortunately older versions of mod_perl 2.0's mp2bug weren't including the mp version number, so I still can't tell what version you are on (not your fault ;). The cvs version's mp2bug does the right thing. Nevertheless I did try the attached files and I can't reproduce this problem with the latest cvs. Try upgrading your mod_perl to the latest cvs version, I have no idea which version you have. I'll use that ASAP. Ok, looking forward for you updated report if you still have the problem with the cvs version. Make sure to send the complete error message so we can map the line number to the offending code in the module. __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Error in compile
Why is the below happening? Script started on Fri Aug 8 20:20:56 2003 doctor.nl2k.ab.ca//usr/source/mod_perl-1.99_09$ make cd src/modules/perl make -f Makefile.modperl rm -f mod_perl.so ld -shared -x -L/usr/X11/lib -L/usr/local/libmod_perl.lo modperl_interp.lo modperl_tipool.lo modperl_log.lo modperl_config.lo modperl_cmd.lo modperl_options.lo modperl_callback.lo modperl_handler.lo modperl_gtop.lo modperl_util.lo modperl_io.lo modperl_filter.lo modperl_bucket.lo modperl_mgv.lo modperl_pcw.lo modperl_global.lo modperl_env.lo modperl_cgi.lo modperl_perl.lo modperl_perl_global.lo modperl_perl_pp.lo modperl_sys.lo modperl_module.lo modperl_svptr_table.lo modperl_const.lo modperl_constants.lo modperl_apache_compat.lo modperl_hooks.lo modperl_directives.lo modperl_flags.lo modperl_xsinit.lo -rdynamic -Wl,-rpath,/usr/libdata/perl5//CORE -L/usr/X11/lib -L/usr/local/lib /usr/libdata/perl5/i386-bsdos/auto/DynaLoader/DynaLoader.a -L/usr/libdata/perl5/i386-bsdos/CORE -lperl -lutil -lbind -ldl -lm -lc -o mod_perl.so ld: -r and -shared may not be used together *** Error code 1 Stop. *** Error code 1 Stop. doctor.nl2k.ab.ca//usr/source/mod_perl-1.99_09$ uname BSD/OS doctor.nl2k.ab.ca//usr/source/mod_perl-1.99_09$ uname -a BSD/OS doctor.nl2k.ab.ca 4.3.1 BSDI BSD/OS 4.3.1 Kernel #8: Tue Jul 29 17:15:03 MDT 2003 [EMAIL PROTECTED]:/usr/src/sys/compile/LOCALTYAN5 i386 doctor.nl2k.ab.ca//usr/source/mod_perl-1.99_09$ gcc -x v Using builtin specs. gcc version 2.95.3 20010315 (release) doctor.nl2k.ab.ca//usr/source/mod_perl-1.99_09$ cc -v Using builtin specs. gcc version 2.95.3 20010315 (release) doctor.nl2k.ab.ca//usr/source/mod_perl-1.99_09$ exit exit Script done on Fri Aug 8 20:21:21 2003 Pointers needed. -- Member - Liberal International On 11 Sept 2001 the WORLD was violated. This is [EMAIL PROTECTED] Ici [EMAIL PROTECTED] Society MUST be saved! Extremists must dissolve. Manchester (LOSERS) United, Liver(LOSER)pool and (N)Everton to be relegated this season in the EPL.
Re: Error in compile
The Doctor wrote: Why is the below happening? we need more info. please see: http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems Script started on Fri Aug 8 20:20:56 2003 doctor.nl2k.ab.ca//usr/source/mod_perl-1.99_09$ make cd src/modules/perl make -f Makefile.modperl rm -f mod_perl.so ld -shared -x -L/usr/X11/lib -L/usr/local/libmod_perl.lo modperl_interp.lo modperl_tipool.lo modperl_log.lo modperl_config.lo modperl_cmd.lo modperl_options.lo modperl_callback.lo modperl_handler.lo modperl_gtop.lo modperl_util.lo modperl_io.lo modperl_filter.lo modperl_bucket.lo modperl_mgv.lo modperl_pcw.lo modperl_global.lo modperl_env.lo modperl_cgi.lo modperl_perl.lo modperl_perl_global.lo modperl_perl_pp.lo modperl_sys.lo modperl_module.lo modperl_svptr_table.lo modperl_const.lo modperl_constants.lo modperl_apache_compat.lo modperl_hooks.lo modperl_directives.lo modperl_flags.lo modperl_xsinit.lo -rdynamic -Wl,-rpath,/usr/libdata/perl5//CORE -L/usr/X11/lib -L/usr/local/lib /usr/libdata/perl5/i386-bsdos/auto/DynaLoader/DynaLoader.a -L/usr/libdata/perl5/i386-bsdos/CORE -lperl -lutil -lbind -ldl -lm -lc -o mod_perl.so ld: -r and -shared may not be used together *** Error code 1 Stop. *** Error code 1 Stop. doctor.nl2k.ab.ca//usr/source/mod_perl-1.99_09$ uname BSD/OS doctor.nl2k.ab.ca//usr/source/mod_perl-1.99_09$ uname -a BSD/OS doctor.nl2k.ab.ca 4.3.1 BSDI BSD/OS 4.3.1 Kernel #8: Tue Jul 29 17:15:03 MDT 2003 [EMAIL PROTECTED]:/usr/src/sys/compile/LOCALTYAN5 i386 doctor.nl2k.ab.ca//usr/source/mod_perl-1.99_09$ gcc -x v Using builtin specs. gcc version 2.95.3 20010315 (release) doctor.nl2k.ab.ca//usr/source/mod_perl-1.99_09$ cc -v Using builtin specs. gcc version 2.95.3 20010315 (release) doctor.nl2k.ab.ca//usr/source/mod_perl-1.99_09$ exit exit Script done on Fri Aug 8 20:21:21 2003 Pointers needed. -- __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com