[perl #57296] [TODO] make install -C languages
# New Ticket Created by Reini Urban # Please include the string: [perl #57296] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57296 --- osname= cygwin osvers= 1.5.25(0.15642) arch= cygwin-thread-multi-64int cc= gcc --- Flags: category=install severity=medium ack=no --- make install -C languages DESTDIR=inst Help generating parrot packages with parrot-languages and self-hosting languages. pbc_to_exe $LANG --install creates now [EMAIL PROTECTED]@ self-hosting binaries with dependencies to /usr/lib/parrot, not to build_dir make installable is needed to create those pbc's. make test-installable is needed to test those pbc's against installed libraries. make install is needed to copy the installables, pmcs and docs to the destination A future plan is to simplify the languages/$LANG/config/root.in framework by auto-generating the automatic targets from some basic make definitions and parts. Really needed is just the definitions for PBCS, PMCS, DOCS, the test and test-installable target and some intermediate targets. Halfway patch attached. --- Summary of my parrot 0.6.4 (r0) configuration: configdate='Sat Jul 19 10:18:22 2008 GMT' Platform: osname=cygwin, archname=cygwin-thread-multi-64int jitcapable=1, jitarchname=i386-cygwin, jitosname=CYGWIN, jitcpuarch=i386 execcapable=1 perl=/usr/bin/perl.exe Compiler: cc='gcc', ccflags='-U__STRICT_ANSI__ -pipe -I/usr/local/include -DHASATTRIBUTE_CONST -DHASATTRIBUTE_DEPRECATED -DHASATTRIBUTE_MALLOC -DHASATTRIBUTE_NONNULL -DHASATTRIBUTE_NORETURN -DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED -DHASATTRIBUTE_WARN_UNUSED_RESULT -falign-functions=16 -maccumulate-outgoing-args -W -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wdisabled-optimization -Wendif-labels -Wextra -Wformat -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit -Wimport -Winit-self -Winline -Winvalid-pch -Wmissing-braces -Wno-missing-format-attribute -Wpacked -Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wno-shadow -Wsign-compare -Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wtrigraphs -Wundef -Wunknown-pragmas -Wno-unused -Wwrite-strings -Wbad-function-cast -Wdeclaration-after-statement -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wnonnull -DDISABLE_GC_DEBUG=1 -DNDEBUG -O3 -DHAS_GETTEXT', Linker and Libraries: ld='gcc', ldflags=' -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base -L/usr/local/lib', cc_ldflags='', libs='-lcrypt -lgmp -lreadline -lpcre /usr/bin/glut32.dll -lglu32 -lopengl32 -lcrypto -lintl' Dynamic Linking: share_ext='.dll', ld_share_flags='-shared', load_ext='.dll', ld_load_flags='-shared' Types: iv=long, intvalsize=4, intsize=4, opcode_t=long, opcode_t_size=4, ptrsize=4, ptr_alignment=1 byteorder=1234, nv=double, numvalsize=8, doublesize=8 Locally applied patches: [perl #51944] [DOCS] Cygwin Readme [perl #56562] [PATCH] root.in: add cygwin importlib [perl #56544] [PATCH] install_files.pl [perl #56558] [PATCH] pdb rename to parrot_pdb [perl #56998] [TODO] rename cygwin dll to cygparrot.dll [perl #57006] [PATCH] add cygwin opengl config quirks [perl #57110] [PATCH] ncurses for cygwin [perl #57112] [PATCH] postgres for cygwin [perl #57114] [PATCH] urm RealBin issue --- Environment: CYGWIN =server HOME =/home/rurban LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH =~/bin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/usr/bin:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/Programme/ATI Technologies/ATI.ACE/Core-Static:/usr/local/bin:/usr/lib/gstreamer-0.8:/usr/lib/lapack SHELL (unset) diff -urN config/gen/languages.pm config/gen/languages.pm --- config/gen/languages.pm 2008-07-02 13:38:41.0 + +++ config/gen/languages.pm 2008-07-26 08:48:41.43750 + @@ -75,7 +75,7 @@ } elsif ( $language eq 'c99' ) { $conf-genfile($langdir/config/makefiles/root.in = $langdir/Makefile); -$conf-genfile($langdir/config/makefiles/cpp.in = $langdir/src/cpp//Makefile); +$conf-genfile($langdir/config/makefiles/cpp.in = $langdir/src/cpp/Makefile); } elsif ( $language eq 'tcl' ) { # tcl has more than one Makefile diff -urN config/gen/makefiles/languages.in config/gen/makefiles/languages.in --- config/gen/makefiles/languages.in 2008-07-02 13:38:41.0 + +++
[perl #43302] [TODO] config/gen/makefiles.pm: Write unit tests
In the course of working on unit tests in the 'parallel' branch, I came across this inline comment in config/gen/makefiles.pm: # Why is this here? I'd think this information belongs # in the CFLAGS.in file. -- A.D. March 12, 2004 if ( $conf-data-get('cpuarch') =~ /sun4|sparc64/ ) { # CFLAGS entries must be left-aligned. print {$CFLAGS} EOF; src/jit_cpu.c -{-Wcast-align}# lots of noise! src/nci.c -{-Wstrict-prototypes} # lots of noise! EOF } My guess is that this code is not found in the CFLAGS.in template file because it is platform-specific. There is no platform- or OS-specific code in CFLAGS.in. So, is there any reason why we shouldn't delete the comment? Thank you very much. kid51
[perl #46805] [TODO] [Perl] Add more list_* tests
On Fri Jul 25 11:06:01 2008, [EMAIL PROTECTED] wrote: On Thu, Jul 24, 2008 at 11:05:28PM -0700, Christoph Otto via RT wrote: From what I can tell, t/src/list.t was deleted or moved sometime after r22464. Searching for some of the more unique-looking strings in that revision of the file ( http://www.parrotvm.org/svn/parrot/checkout/trunk/t/src/list.t?rev=22464) turned up nothing in the current version, indicating that this file was deleted because its function was either unnecessary or redundant. If nobody objects I'll mark this ticket as rejected in a couple days. Go ahead now; I removed that test because it poked into the guts of libparrot unnecessarily to test code that we should be testing elsewhere less invasively. Done.
[perl #56548] PATCH] for file 01-literals.t
On Thu Jul 03 14:15:22 2008, [EMAIL PROTECTED] wrote: (sorry if this arrives multiple times, br0ken ISP and all..) Hi, Although there are some similar tests in t/00-parrot/ I wouldn't start adding more in this file, because the official test suite lives in the pugs repository under t/spec (svn co http://svn.pugscode.org/pugs/t/spec ). The file S02-literals/radix.t seems like the better place to start, there you also have access to better testing tools (like is(), ok() etc.) If you want to contribute to the test suite, please tell us your desired nick name and you can get a commit bit. Cheers, Moritz Since parrot isn't the right place for this patch, is there any reason not to reject this ticket?
[perl #57260] [BUG] Segfaults in sprintf opcode
On Fri Jul 25 14:13:59 2008, japhb wrote: On Fri, 2008-07-25 at 22:18 +0200, Peter Gibbs wrote: typedef HUGEINTVAL(*sprintf_getint_t) (PARROT_INTERP,INTVAL, SPRINTF_OBJ *); So, since obj-getint returns a HUGEINTVAL, I gave it one to store the result in. Fair enough, that's good enough for me. As to why sprintf_obj is defined that way, I have no clue. A question for another day ... when we take a pass through our typedefs and check ourselves for sanity. -'f sprintf2.t now also has one of the tests coke++ originally posted. Since it now passes and is tested for, I'm marking this resolved.
[perl #57286] t/examples/library.t fails during make test on OS X 10.5.4
# New Ticket Created by Jeff Lavallee # Please include the string: [perl #57286] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57286 --- osname= darwin osvers= 9.0 arch= darwin-thread-multi-2level cc= cc --- Flags: category=library severity=medium ack=no --- Latest parrot code from svn. During make test, t/example/library.t fails: t/examples/library...ok 1/4Failed to load libpcre current instr.: 'parrot;PCRE;init' pc 110 (library/pcre.pir:111) called from Sub 'parrot;PCRE;main' pc 269 (examples/library/pcre.pir:39) # Failed test 'examples/library/pcre.pir' # at t/examples/library.t line 67. # got: '' # expected: 'asdf =~ /as/ # 1 match(es): # as # ' t/examples/library...NOK 3/4# Looks like you failed 1 test of 4. t/examples/library...dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 3 Failed 1/4 tests, 75.00% okay --- Summary of my parrot 0.6.4 (r29739) configuration: configdate='Fri Jul 25 22:26:02 2008 GMT' Platform: osname=darwin, archname=darwin-2level jitcapable=0, jitarchname=nojit, jitosname=darwin, jitcpuarch=i386 execcapable=0 perl=perl Compiler: cc='cc', ccflags='-fno-common -no-cpp-precomp -pipe -pipe -fno-common -Wno-long-double -DHASATTRIBUTE_CONST -DHASATTRIBUTE_DEPRECATED -DHASATTRIBUTE_MALLOC -DHASATTRIBUTE_NONNULL -DHASATTRIBUTE_NORETURN -DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED -DHASATTRIBUTE_WARN_UNUSED_RESULT -falign-functions=16 -fvisibility=hidden -maccumulate-outgoing-args -W -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wdisabled-optimization -Wendif-labels -Wextra -Wformat -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit -Wimport -Winit-self -Winline -Winvalid-pch -Wmissing-braces -Wmissing-field-initializers -Wno-missing-format-attribute -Wmissing-include-dirs -Wpacked -Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wno-shadow -Wsign-compare -Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wtrigraphs -Wundef -Wunknown-pragmas -Wno-unused -Wvariadic-macros -Wwrite-strings -Wbad-function-cast -W declaration-after-statement -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wnonnull -I/opt/local/include -DHAS_GETTEXT', Linker and Libraries: ld='c++', ldflags=' -L/Users/jeff/Code/parrot/blib/lib -L/opt/local/lib', cc_ldflags='', libs='-lm -lutil -lreadline -lpcre -framework OpenGL -framework GLUT -lcrypto -lintl' Dynamic Linking: share_ext='.dylib', ld_share_flags='-dynamiclib -undefined dynamic_lookup', load_ext='.bundle', ld_load_flags='-undefined dynamic_lookup -bundle' Types: iv=long, intvalsize=4, intsize=4, opcode_t=long, opcode_t_size=4, ptrsize=4, ptr_alignment=1 byteorder=1234, nv=double, numvalsize=8, doublesize=8 --- Environment: DYLD_LIBRARY_PATH =/usr/local/lib/ImageMagick/lib HOME =/Users/jeff LANG =en_US.UTF-8 LANGUAGE (unset) LC_CTYPE =en_US.UTF-8 LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH =/usr/local/bin:/usr/local/sbin:/usr/bin:/Users/jeff/.bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin/:/usr/local/mysql/bin:/usr/X11R6/bin:/bin:/opt/local/bin:/usr/local/git/bin SHELL =/bin/bash
Re: [perl #56548] PATCH] for file 01-literals.t
Just move the ticket to the perl6 queue. On 7/25/08, Christoph Otto via RT [EMAIL PROTECTED] wrote: On Thu Jul 03 14:15:22 2008, [EMAIL PROTECTED] wrote: (sorry if this arrives multiple times, br0ken ISP and all..) Hi, Although there are some similar tests in t/00-parrot/ I wouldn't start adding more in this file, because the official test suite lives in the pugs repository under t/spec (svn co http://svn.pugscode.org/pugs/t/spec ). The file S02-literals/radix.t seems like the better place to start, there you also have access to better testing tools (like is(), ok() etc.) If you want to contribute to the test suite, please tell us your desired nick name and you can get a commit bit. Cheers, Moritz Since parrot isn't the right place for this patch, is there any reason not to reject this ticket? -- Will Coke Coleda
Re: [perl #56810] [CAGE] pf_items assumes sizeof(INTVAL) == sizeof(opcode_t)
On Thursday 10 July 2008 13:42:07 Andrew Whitworth wrote: I found this while tracking a nasty GC-related bug. In src/packfile/pf_items.c:PF_fetch_integer, we have the following two notes: XXX assumes Csizeof (INTVAL) == sizeof (opcode_t) - we don't have INTVAL size in the PackFile header XXX assume sizeof (opcode_t) == sizeof (INTVAL) on the machine producing this PBC This raises the question, are the two always defined to be the same (which makes this a non-issue), or are there platforms where they are different? I suspect a fix would not be too too difficult if they aren't always the same, and if the behavior wasn't already implemented elsewhere. They're defined in parrot/config.h, which gets built from config/gen/config_h/config_h.in: -- typedef @iv@Parrot_Int; typedef unsigned @iv@ Parrot_UInt; typedef @nv@Parrot_Float; -- typedef @opcode_t@ Parrot_Opcode; The defaults are in config/inter/types.pm, and both default to 'long'. However, in prompting mode, the user can set both to different sizes. That's probably a mistake. If we prevented them from differing, we could remove these comments. -- c
Re: [perl #48367] [BUG] intlist_get could be dereferencing NULL
On Friday 25 July 2008 01:12:55 Christoph Otto via RT wrote: According to make cover, the case where the return was -1 was never hit. A simple test case caused a segfault, which definitely isn't the right thing. The attached patch fixes and refactors intlist_get() to make the coverage more obvious in the output of the coverage tests. It also adds a test case to exercise the previously neglected path. I'd like comments on whether intlist_get does the right thing with this patch and if it's exercised correctly by the test. IntList PMCs can resize, so it looks correct to me. Index: src/intlist.c === --- src/intlist.c (revision 29733) +++ src/intlist.c (working copy) @@ -306,10 +306,13 @@ INTVAL intlist_get(PARROT_INTERP, ARGMOD(IntList *list), INTVAL idx) { - /* XXX list_get can return NULL RT #48367 */ void * const ret = list_get(interp, (List *)list, idx, enum_type_INTVAL); - const INTVAL retval = ret == (void *)-1 ? 0 : *(INTVAL *)ret; - return retval; + if (ret == NULL) { + return (INTVAL)0; + } + else { + return *(INTVAL *)ret; + } } I'd write that as: if (ret) return *(INTVAL *)ret; return (INTVAL)0; The pointer casting dereferencing bothers me a little, but if compilers don't warn about it -- c
[perl #57286] t/examples/library.t fails during make test on OS X 10.5.4
I tried this test on an older Mac: OS X 10.4 on Darwin. I did not get any outright failures because one test is SKIPped and another is expected to fail and hence is TODOed out. $ prove -v t/examples/library.t t/examples/library 1..4 ok 1 - examples/library/getopt_demo.pir ok 2 - examples/library/md5sum.pir ok 3 # SKIP no pcre-config not ok 4 - ncurses_life.pir # TODO ncurses_life.pir not testable yet # Failed (TODO) test 'ncurses_life.pir' # at t/examples/library.t line 77. ok All tests successful. Files=1, Tests=4, 6 wallclock secs ( 0.04 usr 0.02 sys + 0.41 cusr 0.28 csys = 0.75 CPU) Result: PASS Could you post the output of prove -v on this file? Thank you very much. kid51
Re: Inter-HLL Mapping Notes
From: Mark Glines [EMAIL PROTECTED] Date: Tue, 22 Jul 2008 21:58:10 -0700 . . . Integer is a good example of the problem, actually. The internal storage format doesn't change, but the methods you can call on it definitely will. HLLs wrap the Integer class with their own subclasses, so that they have methods they can call on integers, which are expected by the HLL. Since HLLs can define their own multimethods on the existing Integer class without subclassing, and without fear of conflict, that is not sufficient reason for it. -- Bob
Clue! (or, Attention Crazy People Looking for a Project)
Clue is an ANSI C compiler (C89, some C99) that targets high-level languages such as Lua, Javascript or Perl. It supports the entire C language, including pointer arithmetic, and can be used to run arbitrary pure-C programs. http://cluecc.sourceforge.net/