Skip Menu |
 

This queue is for tickets about the Proc-ProcessTable CPAN distribution.

Report information
The Basics
Id: 48445
Status: resolved
Priority: 0/
Queue: Proc-ProcessTable

People
Owner: REHSACK [...] cpan.org
Requestors: jquelin [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.45
Fixed in: (no value)

Attachments
Proc-ProcessTable-0.45-fix-format-errors.patch



Subject: compilation fails on linux
Download (untitled) / with headers
text/plain 1.5k
$ /usr/bin/perl Makefile.PL INSTALLDIRS=vendor Processing hints file hints/linux.pl Checking if your kit is complete... Looks good Writing Makefile for Proc::ProcessTable::Process Writing Makefile for Proc::ProcessTable $ make -j2 /usr/bin/perl5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.10.0/ExtUtils/typemap ProcessTable.xs > ProcessTable.xsc && mv ProcessTable.xsc ProcessTable.c cp Killall.pm blib/lib/Proc/Killall.pm cp ProcessTable.pm blib/lib/Proc/ProcessTable.pm cp example.pl blib/lib/Proc/example.pl cp Killfam.pm blib/lib/Proc/Killfam.pm x86_64-mandriva-linux-gnu-gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -DVERSION=\"0.45\" -DXS_VERSION=\"0.45\" -fPIC "-I/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE" OS.c OS.c: In function ‘eval_link’: OS.c:400: error: format not a string literal and no format arguments OS.c: In function ‘OS_get_table’: OS.c:621: error: format not a string literal and no format arguments OS.c:691: attention : passing argument 2 of ‘bless_into_proc’ from incompatible pointer type os/Linux.h:4: note: expected ‘char **’ but argument is of type ‘const char * const*’ make: *** [OS.o] Error 1 the first 2 problems are due to the -Werror=format-security gcc flag, and should be easily fixable but i don't know about the last one...
Download (untitled) / with headers
text/plain 318b
Le Mer. Aoû. 05 05:54:13 2009, JQUELIN a écrit : Show quoted text
> the first 2 problems are due to the -Werror=format-security gcc flag, > and should be easily fixable but i don't know about the last one...
The last one is just a warning. There is another format error in ProcessTable.xs, tough. Attached patch fixes the errors.
diff -Naur -x '*~' Proc-ProcessTable-0.45/os/Linux.c Proc-ProcessTable-0.45-fix-format-errors/os/Linux.c --- Proc-ProcessTable-0.45/os/Linux.c 2008-09-08 17:10:41.000000000 +0200 +++ Proc-ProcessTable-0.45-fix-format-errors/os/Linux.c 2009-09-03 23:19:05.000000000 +0200 @@ -397,7 +397,7 @@ /* copy the path onto our obstack, set the value (somewhere in pts) * and free the results of canonicalize_file_name */ - obstack_printf(mem_pool, link); + obstack_printf(mem_pool, "%s", link); obstack_1grow(mem_pool, '\0'); *ptr = (char *) obstack_finish(mem_pool); @@ -618,7 +618,7 @@ bzero(prs, sizeof(struct procstat)); /* intilize the format string */ - obstack_printf(&mem_pool, get_string(STR_DEFAULT_FORMAT)); + obstack_printf(&mem_pool, "%s", get_string(STR_DEFAULT_FORMAT)); obstack_1grow(&mem_pool, '\0'); format_str = (char *) obstack_finish(&mem_pool); diff -Naur -x '*~' Proc-ProcessTable-0.45/ProcessTable.xs Proc-ProcessTable-0.45-fix-format-errors/ProcessTable.xs --- Proc-ProcessTable-0.45/ProcessTable.xs 2008-01-26 06:12:22.000000000 +0100 +++ Proc-ProcessTable-0.45-fix-format-errors/ProcessTable.xs 2009-09-03 23:20:24.000000000 +0200 @@ -388,5 +388,5 @@ char* error; if( (error = OS_initialize()) != NULL ){ - croak(error); + croak("%s", error); }
Download (untitled) / with headers
text/plain 125b
Hi, is thre an ETA on the release of this patch as part of the official release? Show quoted text
> > Attached patch fixes the errors. >
Download (untitled) / with headers
text/plain 416b
On Thu Jan 14 18:10:58 2010, DHORNE wrote: Show quoted text
> Hi, is thre an ETA on the release of this patch as part of the official > release?
No, I'm sorry. I'm currently work on SQL::Statement 1.24 - but I'll start immediately with Proc::ProcessTable, when S:S 1.24 is out. The main problem is, that simply applying all the patches will not solve all the problems. There is finally more to do (refactoring and cleanup). Jens
Download (untitled) / with headers
text/plain 153b
I also find it necessary to export LDLOADLIBS=-pthread before perl Makefile.PL (Fedora Core 10) in order to avoid an undefined symbol pthread_once.
Download (untitled) / with headers
text/plain 122b
Bump for great justice.. We're encountering issues with this module on 64-bit linux under both perl5.10.1 and perl5.12.x.
Added changes to github repo.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.