Ticket #1841 (closed RFC: fixed)

Opened 4 years ago

Last modified 4 years ago

Add 'osvers' key-value pair to Configure.pl

Reported by: jkeenan Owned by: jkeenan
Priority: normal Milestone: 2.10
Component: configure Version: 2.10.0
Severity: medium Keywords:
Cc: doughera Language:
Patch status: Platform:

Description

In TT #1840, Andy Dougherty recommended that we set an osvers key-value pair in Configure.pl.

Parrot doesn't generally use perl5's $Config{osvers}, 
though parrotbug uses  it in bug reports.  Oddly, 
init/hints/freebsd.pm recomputes $osversion, but 
never uses it.  I think it would make sense to 
add an osvers key to the existing cpuarch and 
osname keys in the config/auto/arch.pm step.

Since that Trac ticket has a different focus, I'm separating out the question of osvers into a separate ticket.

Change History

Changed 4 years ago by jkeenan

Created the tt1841_osvers branch in Subversion to work on this. Made modifications to config/init/defaults.pm, the OS-specific init/hints files for FreeBSD, Darwin and Linux, and config/auto/arch.pm in r49767. The value for osvers is not yet used anywhere. Parrot configures, builds and passes make test on Linux; see  smolder 883.

Changed 4 years ago by jkeenan

  • status changed from new to assigned
  • owner set to jkeenan

Changed 4 years ago by jkeenan

If there is no objection, I will merge this branch into trunk over the weekend.

Thank you very much.

kid51

Changed 4 years ago by jkeenan

  • status changed from assigned to closed
  • resolution set to fixed

Merged into trunk at r49788. Closing ticket.

Changed 4 years ago by jkeenan

  • status changed from closed to reopened
  • resolution fixed deleted

I have to re-open this ticket because we got a  Taptinder build failure report on FreeBSD immediately after r49788.

The failure is very curious, as it indicates that on the tester's box, the addition of osvers to our configuration data causes a value called __APPLE_CC__ to fail to be detected.

cc -I./include -I./include/pmc -DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.9/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H  -pipe -I/usr/local/include -DHASATTRIBUTE_CONST  -DHASATTRIBUTE_DEPRECATED  -DHASATTRIBUTE_MALLOC  -DHASATTRIBUTE_NONNULL  -DHASATTRIBUTE_NORETURN  -DHASATTRIBUTE_PURE  -DHASATTRIBUTE_UNUSED  -DHASATTRIBUTE_WARN_UNUSED_RESULT  -DHAS_GETTEXT  -g   -DPIC -fPIC  -falign-functions=16 -fvisibility=hidden -funit-at-a-time -maccumulate-outgoing-args -W -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wdisabled-optimization -Wdiv-by-zero -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 -Wmultichar -Wpacked -Wparentheses -Wpointer-arith -Wpointer-sign -Wreturn-type -Wsequence-point -Wsign-compare -Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wtrigraphs -Wundef -Wno-unused -Wunknown-pragmas -Wvariadic-macros -Wwrite-strings -Wbad-function-cast -Wc++-compat -Wdeclaration-after-statement -Werror=declaration-after-statement -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wnonnull -Wold-style-definition -Wstrict-prototypes -Isrc/string -o src/string/api.o -c src/string/api.c
In file included from ./include/parrot/parrot.h:230,
                 from src/string/api.c:28:
/usr/local/include/libintl.h:91:25: warning: "__APPLE_CC__" is not defined
/usr/local/include/libintl.h:113:24: warning: "__APPLE_CC__" is not defined
cc -I./include -I./include/pmc -DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.9/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H  -pipe -I/usr/local/include -DHASATTRIBUTE_CONST  -DHASATTRIBUTE_DEPRECATED  -DHASATTRIBUTE_MALLOC  -DHASATTRIBUTE_NONNULL  -DHASATTRIBUTE_NORETURN  -DHASATTRIBUTE_PURE  -DHASATTRIBUTE_UNUSED  -DHASATTRIBUTE_WARN_UNUSED_RESULT  -DHAS_GETTEXT  -g   -DPIC -fPIC  -falign-functions=16 -fvisibility=hidden -funit-at-a-time -maccumulate-outgoing-args -W -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wdisabled-optimization -Wdiv-by-zero -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 -Wmultichar -Wpacked -Wparentheses -Wpointer-arith -Wpointer-sign -Wreturn-type -Wsequence-point -Wsign-compare -Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wtrigraphs -Wundef -Wno-unused -Wunknown-pragmas -Wvariadic-macros -Wwrite-strings -Wbad-function-cast -Wc++-compat -Wdeclaration-after-statement -Werror=declaration-after-statement -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wnonnull -Wold-style-definition -Wstrict-prototypes -Isrc/ops -o src/ops/core_ops.o -c src/ops/core_ops.c
In file included from ./include/parrot/parrot.h:230,
                 from ./include/parrot/oplib/core_ops.h:19,
                 from src/ops/core_ops.c:13:
/usr/local/include/libintl.h:91:25: warning: "__APPLE_CC__" is not defined
/usr/local/include/libintl.h:113:24: warning: "__APPLE_CC__" is not defined

And so forth. But as yet we're not actually using osvers in make.

I reverted the assignment to osvers in config/init/hints/freebsd.pm in r47090 and am awaiting a new Taptinder report. (I don't myself have a FreeBSD box available.)

Thank you very much.

kid51

Changed 4 years ago by jkeenan

Here are excerpts from two Taptinder build reports on FreeBSD. Curiously the value assigned to osvers is associated with two different ways of invoking miniparrot.

First, assigning a value to osvers in r47088:

cc -o ./miniparrot src/main.o src/null_config.o  -L/usr/home/jurosz/tt1/client-data/Parrot-trunk-temp/blib/lib 
  -lparrot  -lm -lcrypt -lutil -lreadline -lintl -Wl,-E  -L/usr/local/lib
/usr/home/jurosz/tt1/client-data/Parrot-trunk-temp/blib/lib/libparrot.a(thread.o)(.text+0x2ab3): 
  In function `pt_thread_run':
src/thread.c:753: undefined reference to `pthread_create'
*** Error code 1

Next, reverting to no assignment to osvers on FreeBSD in r47090:

g++ -o ./miniparrot src/main.o src/null_config.o  -Wl,-R/usr/home/jurosz/tt1/client-data/Parrot-trunk-temp/blib/lib 
  -L/usr/home/jurosz/tt1/client-data/Parrot-trunk-temp/blib/lib -lparrot  -lm -lcrypt -lutil -pthread -lreadline -lintl 
  -Wl,-E  -L/usr/local/lib
./miniparrot -Iruntime/parrot/include config_lib.pir > runtime/parrot/include/config.fpmc
perl tools/build/parrot_config_c.pl >  src/parrot_config.c

Changed 4 years ago by doughera

>  Here are excerpts from two Taptinder build reports on FreeBSD.  Curiously
>  the value assigned to `osvers` is associated with two different ways of
>  invoking `miniparrot`.

I think it's an extra trailing semicolon on the osvers => line in 
hints/freebsd.pm.  That results in a syntax error, which causes that 
statement to fail, which ends up not adding -pthread, and not changing the 
linker to g++.

-- 
    Andy Dougherty		doughera@lafayette.edu


Changed 4 years ago by jkeenan

  • status changed from reopened to new

Changed 4 years ago by jkeenan

  • status changed from new to closed
  • resolution set to fixed

AndyD++. Correction applied in r49795. Taptinder reports pass. Re-closing ticket.

Note: See TracTickets for help on using tickets.