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

Incorrect path from File::Spec->rel2abs in OS/2 #7575

Open
p5pRT opened this issue Nov 1, 2004 · 14 comments
Open

Incorrect path from File::Spec->rel2abs in OS/2 #7575

p5pRT opened this issue Nov 1, 2004 · 14 comments

Comments

@p5pRT
Copy link

p5pRT commented Nov 1, 2004

Migrated from rt.perl.org#32274 (status was 'open')

Searchable as RT32274$

@p5pRT
Copy link
Author

p5pRT commented Nov 1, 2004

From Shmuel+gen@patriot.net

In OS/2 there is a concept of current drive, and there is a working
directory for each drive. If the input to File​::>Spec->rel2abs
specifies a drive, the code uses the working directory of the current
drive instead of the working directory of the specified drive. Note
that the bypass is to use Cwd​::abs_path, which works correctly.

I am composing this on a Linux system with Perl 5.8.3, but the problem
occurs on OS/2 with Perl 5.8.2; I wasn able to get perlbug to work on
my OS/2 system.

[H​:\]perl -V

Summary of my perl5 (revision 5.0 version 8 subversion 2)
configuration​:
  Platform​:
  osname=os2, osvers=2.30, archname=os2
  uname='os2 ia-ia 2 2.30 i386 '
  config_args='-des -D prefix=i​:/perllib'
  hint=recommended, useposix=true, d_sigaction=define
  usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
  useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
  use64bitint=undef use64bitall=undef uselongdouble=undef
  usemymalloc=y, bincompat5005=undef
  Compiler​:
  cc='gcc', ccflags ='-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I.
-D_EMX_CRT_REV_=60',
  optimize='-O2 -fomit-frame-pointer -malign-loops=2 -malign-jumps=2
-malign-functions=2 -s',
  cppflags='-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I.
-D_EMX_CRT_REV_=60'
  ccversion='', gccversion='2.8.1', gccosandvers=''
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
  d_longlong=define, longlongsize=8, d_longdbl=define,
longdblsize=12
  ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=4
  alignbytes=4, prototype=define
  Linker and Libraries​:
  ld='gcc', ldflags ='-Zexe -Zomf -Zmt -Zcrtdll -Zstack 32000
-Zlinker /e​:2'
  libpth=i​:/emx.add/lib i​:/emx/lib i​:/emx.f77/lib
D​:/DEVTOOLS/OPENGL/LIB I​:/JAVA11/LIB i​:/emx/lib/mt
  libs=-lsocket -lm -lbsd -lcrypt
  perllibs=-lsocket -lm -lbsd -lcrypt
  libc=i​:/emx/lib/mt/c_import.lib, so=dll, useshrplib=true,
libperl=libperl.lib
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
  cccdlflags='-Zdll', lddlflags='-Zdll -Zomf -Zmt -Zcrtdll -Zlinker
/e​:2'

Characteristics of this binary (from libperl)​:
  Compile-time options​: USE_LARGE_FILES
  Built under os2
  Compiled at Dec 14 2003 01​:02​:36
  %ENV​:
  PERL5LIB="g​:\perllib\LIB"
  PERLLIB_PREFIX="i​:/perllib/lib;G​:\PERLLIB\LIB"
  PERL_BADLANG="0"
  PERL_SH_DIR="G​:\BIN"
  @​INC​:
  g​:\perllib\LIB/5.8.2/os2
  g​:\perllib\LIB/5.8.2
  g​:\perllib\LIB/5.00553
  g​:\perllib\LIB
  G​:/PERLLIB/LIB/5.8.2/os2
  G​:/PERLLIB/LIB/5.8.2
  G​:/PERLLIB/LIB/site_perl/5.8.2/os2
  G​:/PERLLIB/LIB/site_perl/5.8.2
  G​:/PERLLIB/LIB/site_perl/5.00553
  G​:/PERLLIB/LIB/site_perl
  .

--
  Shmuel (Seymour J.) Metz, SysProg and JOAT
  Atid/2 <http​://patriot.net/~shmuel>
We don't care. We don't have to care, we're Congress.
(S877​: The Shut up and Eat Your spam act of 2003)

@p5pRT
Copy link
Author

p5pRT commented Nov 1, 2004

From Shmuel+gen@patriot.net

Created by shmuel+CPAN@patriot.net

In OS/2 there is a concept of current drive, and there is a working directory for each drive. If the input to File​::>Spec->rel2abs specifies a drive, the code uses the working directory of the current drive instead of the working directory of the specified drive. Note that the bypass is to use Cwd​::abs_path, which works correctly.

I am composing this on a Linux system with Perl 5.8.3, but the problem occurs on OS/2 with Perl 5.8.2; I wasn able to get perlbug to work on my OS/2 system.

Perl Info

Flags:
    category=library
    severity=medium

This perlbug was built using Perl v5.8.3 - Sat Apr  3 00:50:30 UTC 2004
It is being executed now by  Perl v5.8.3 - Sat Apr  3 00:37:21 UTC 2004.

Site configuration information for perl v5.8.3:

Configured by abuild at Sat Apr  3 00:37:21 UTC 2004.

Summary of my perl5 (revision 5.0 version 8 subversion 3) configuration:
  Platform:
    osname=linux, osvers=2.6.4, archname=i586-linux-thread-multi
    uname='linux d209 2.6.4 #1 smp thu mar 11 17:56:49 utc 2004 i686 i686 i386 gnulinux '
    config_args='-ds -e -Dprefix=/usr -Dvendorprefix=/usr -Dinstallusrbinperl -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm -Duseshrplib=true -Doptimize=-O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -Wall -pipe'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -Wall -pipe',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing'
    ccversion='', gccversion='3.3.3 (SuSE Linux)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =''
    libpth=/lib /usr/lib /usr/local/lib
    libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.3.3'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.8.3/i586-linux-thread-multi/CORE'
    cccdlflags='-fPIC', lddlflags='-shared'

Locally applied patches:
    


@INC for perl v5.8.3:
    /usr/lib/perl5/5.8.3/i586-linux-thread-multi
    /usr/lib/perl5/5.8.3
    /usr/lib/perl5/site_perl/5.8.3/i586-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.3
    /usr/lib/perl5/site_perl
    /usr/lib/perl5/vendor_perl/5.8.3/i586-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.3
    /usr/lib/perl5/vendor_perl
    .


Environment for perl v5.8.3:
    HOME=/root
    LANG (unset)
    LANGUAGE (unset)
    LC_CTYPE=en_US.UTF-8
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/bin
    PERL_BADLANG (unset)
    SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Nov 1, 2004

From @schwern

On Mon, Nov 01, 2004 at 08​:37​:08PM -0000, Shmuel (Seymour J.) Metz wrote​:

I am composing this on a Linux system with Perl 5.8.3, but the problem
occurs on OS/2 with Perl 5.8.2; I wasn able to get perlbug to work on
my OS/2 system.

There is a newer version of File​::Spec on CPAN. Could you give it a try?
http​://search.cpan.org/dist/File-Spec/

--
Michael G Schwern schwern@​pobox.com http​://www.pobox.com/~schwern/
Death follows me like a wee followey thing.
  -- Quakeman

@p5pRT
Copy link
Author

p5pRT commented Nov 1, 2004

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Nov 2, 2004

From @ysth

On Mon, Nov 01, 2004 at 06​:37​:21PM -0500, Michael G Schwern <schwern@​pobox.com> wrote​:

On Mon, Nov 01, 2004 at 08​:37​:08PM -0000, Shmuel (Seymour J.) Metz wrote​:

I am composing this on a Linux system with Perl 5.8.3, but the problem
occurs on OS/2 with Perl 5.8.2; I wasn able to get perlbug to work on
my OS/2 system.

There is a newer version of File​::Spec on CPAN. Could you give it a try?
http​://search.cpan.org/dist/File-Spec/

File-Spec and Cwd have been repackaged together (due to mutual dependence)
as http​://search.cpan.org/dist/PathTools/

but there isn't currently any difference except for $File​::Spec​::VERSION.

@p5pRT
Copy link
Author

p5pRT commented Nov 2, 2004

From @steve-m-hay

[Shmuel+gen@​patriot.net - Mon Nov 01 12​:37​:07 2004]​:

In OS/2 there is a concept of current drive, and there is a working
directory for each drive. If the input to File​::>Spec->rel2abs
specifies a drive, the code uses the working directory of the current
drive instead of the working directory of the specified drive. Note
that the bypass is to use Cwd​::abs_path, which works correctly.

Sounds exactly like a problem that existed on Win32. I sent some
patches to fix it for Win32, which went into File-Spec-0.88 and Cwd-2.18
respectively.

The patches added Cwd​::getdcwd() to get the current working directory
for the specified drive/volume, and then changed
File​::Spec​::Win32​::rel2abs() to make use of it appropriately.

Perhaps you can extend Cwd​::getdcwd() to provide a version for OS/2 (it
is currently only defined on Win32), and then modify
File​::Spec​::OS2​::rel2abs() to use it?

I don't have an OS/2 machine at my disposal, and know nothing about them
anyway, so I can't really do this myself ;)

- Steve

@p5pRT
Copy link
Author

p5pRT commented May 27, 2012

From @jkeenan

On Mon Nov 01 12​:37​:07 2004, Shmuel+gen@​patriot.net wrote​:

In OS/2 there is a concept of current drive, and there is a working
directory for each drive. If the input to File​::>Spec->rel2abs
specifies a drive, the code uses the working directory of the current
drive instead of the working directory of the specified drive. Note
that the bypass is to use Cwd​::abs_path, which works correctly.

I am composing this on a Linux system with Perl 5.8.3, but the problem
occurs on OS/2 with Perl 5.8.2; I wasn able to get perlbug to work on
my OS/2 system.

Is there anyone who can build a recent Perl on OS/2 who could comment as
to whether this bug is still present?

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented May 29, 2012

From paul@smedley.id.au

Just saw Perl 5.16.0 is out - does that include the fix?

On 27/05/12 21​:31, Shmuel (Seymour J.) Metz wrote​:

In<rt-3.6.HEAD-7788-1338082147-1665.32274-94-0@​perl.org>, on
05/26/2012
at 06​:29 PM, "James E Keenan via RT"<perlbug-followup@​perl.org>
said​:

Is there anyone who can build a recent Perl on OS/2 who could comment
as to whether this bug is still present?

Do you need a new build of Perl itself or just the one package? I can
do the latter. I've cc'd Paul Smedley in case you need the former; I
don't know his constraints.

@p5pRT
Copy link
Author

p5pRT commented May 29, 2012

From Shmuel+gen@patriot.net

In <rt-3.6.HEAD-7788-1338082147-1665.32274-94-0@​perl.org>, on
05/26/2012
  at 06​:29 PM, "James E Keenan via RT" <perlbug-followup@​perl.org>
said​:

Is there anyone who can build a recent Perl on OS/2 who could comment
as to whether this bug is still present?

Do you need a new build of Perl itself or just the one package? I can
do the latter. I've cc'd Paul Smedley in case you need the former; I
don't know his constraints.

--
  Shmuel (Seymour J.) Metz, SysProg and JOAT
  Atid/2 <http​://patriot.net/~shmuel>
We don't care. We don't have to care, we're Congress.
(S877​: The Shut up and Eat Your spam act of 2003)

@p5pRT
Copy link
Author

p5pRT commented May 29, 2012

From paul@smedley.id.au

I can build an updated Perl - where do I get the source?

On 27/05/12 21​:31, Shmuel (Seymour J.) Metz wrote​:

In<rt-3.6.HEAD-7788-1338082147-1665.32274-94-0@​perl.org>, on
05/26/2012
at 06​:29 PM, "James E Keenan via RT"<perlbug-followup@​perl.org>
said​:

Is there anyone who can build a recent Perl on OS/2 who could comment
as to whether this bug is still present?

Do you need a new build of Perl itself or just the one package? I can
do the latter. I've cc'd Paul Smedley in case you need the former; I
don't know his constraints.

@p5pRT
Copy link
Author

p5pRT commented May 29, 2012

From @cpansprout

On Mon May 28 22​:24​:59 2012, paul@​smedley.id.au wrote​:

I can build an updated Perl - where do I get the source?

http​://cpan.perl.org/src/README.html
http​://www.cpan.org/src/5.0/perl-5.16.0.tar.gz

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Jun 30, 2013

From @jkeenan

On Mon May 28 22​:24​:59 2012, paul@​smedley.id.au wrote​:

I can build an updated Perl - where do I get the source?

On 27/05/12 21​:31, Shmuel (Seymour J.) Metz wrote​:

In<rt-3.6.HEAD-7788-1338082147-1665.32274-94-0@​perl.org>, on
05/26/2012
at 06​:29 PM, "James E Keenan via RT"<perlbug-followup@​perl.org>
said​:

Is there anyone who can build a recent Perl on OS/2 who could comment
as to whether this bug is still present?

Do you need a new build of Perl itself or just the one package? I can
do the latter. I've cc'd Paul Smedley in case you need the former; I
don't know his constraints.

Is it possible to get an update on this bug report re OS/2?

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Jul 2, 2013

From paul@smedley.id.au

Hi All,

On 30/06/13 21​:28, Shmuel (Seymour J.) Metz wrote​:

In <rt-3.6.HEAD-19380-1372553004-1924.32274-94-0@​perl.org>, on
06/29/2013
at 05​:43 PM, "James E Keenan via RT" <perlbug-followup@​perl.org>
said​:

On Mon May 28 22​:24​:59 2012, paul@​smedley.id.au wrote​:

I can build an updated Perl - where do I get the source?

On 27/05/12 21​:31, Shmuel (Seymour J.) Metz wrote​:

In<rt-3.6.HEAD-7788-1338082147-1665.32274-94-0@​perl.org>, on
05/26/2012
at 06​:29 PM, "James E Keenan via RT"<perlbug-followup@​perl.org>
said​:

Is there anyone who can build a recent Perl on OS/2 who could comment
as to whether this bug is still present?

Do you need a new build of Perl itself or just the one package? I can
do the latter. I've cc'd Paul Smedley in case you need the former; I
don't know his constraints.

Is it possible to get an update on this bug report re OS/2?

Paul Smedley has a build of 5.16 for OS/2
<http​://smedley.id.au/tmp/perl-5.16.3-os2-20130519.zip>; I plan to
download it and try.

Paul​: have you been posting your OS/2 related fixes to the new Perl
bug tracking system?

No, I don't consider the build solid enough (due to the transition from
EMX to LIBC) at this point. ie many tests fail.

Cheers,

Paul

@p5pRT
Copy link
Author

p5pRT commented Jul 2, 2013

From Shmuel+gen@patriot.net

In <rt-3.6.HEAD-19380-1372553004-1924.32274-94-0@​perl.org>, on
06/29/2013
  at 05​:43 PM, "James E Keenan via RT" <perlbug-followup@​perl.org>
said​:

On Mon May 28 22​:24​:59 2012, paul@​smedley.id.au wrote​:

I can build an updated Perl - where do I get the source?

On 27/05/12 21​:31, Shmuel (Seymour J.) Metz wrote​:

In<rt-3.6.HEAD-7788-1338082147-1665.32274-94-0@​perl.org>, on
05/26/2012
at 06​:29 PM, "James E Keenan via RT"<perlbug-followup@​perl.org>
said​:

Is there anyone who can build a recent Perl on OS/2 who could comment
as to whether this bug is still present?

Do you need a new build of Perl itself or just the one package? I can
do the latter. I've cc'd Paul Smedley in case you need the former; I
don't know his constraints.

Is it possible to get an update on this bug report re OS/2?

Paul Smedley has a build of 5.16 for OS/2
<http​://smedley.id.au/tmp/perl-5.16.3-os2-20130519.zip>; I plan to
download it and try.

Paul​: have you been posting your OS/2 related fixes to the new Perl
bug tracking system?

--
  Shmuel (Seymour J.) Metz, SysProg and JOAT
  Atid/2 <http​://patriot.net/~shmuel>
We don't care. We don't have to care, we're Congress.
(S877​: The Shut up and Eat Your spam act of 2003)

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

2 participants