I tried to compile R-beta_2010-10-02_r53128 on FreeBSD 9.0-CURRENT (amd64) with gcc-4.4.5 and it fails: ----------------------------------------- gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c sysutils.c -o sysutils.o sysutils.c: In function 'R_system': sysutils.c:289: warning: implicit declaration of function 'WIFEXITED' sysutils.c:289: warning: implicit declaration of function 'WEXITSTATUS' gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c unique.c -o unique.o gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c util.c -o util.o gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c version.c -o version.o gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c vfonts.c -o vfonts.o gfortran -g -O2 -c xxxpr.f -o xxxpr.o ar cr libR.a CConverters.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o agrep.o apply.o arithmetic.o array.o attrib.o base.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cov.o cum.o dcf.o datetime.o debug.o deparse.o deriv.o devices.o dotcode.o dounzip.o dstruct.o duplicate.o engine.o envir.o errors.o eval.o format.o fourier.o gevents.o gram.o gram-ex.o gramLatex.o gramRd.o graphics.o grep.o identical.o inlined.o inspect.o internet.o iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o match.o memory.o model.o names.o objects.o optim.o optimize.o options.o par.o paste.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o qsort.o random.o raw.o registration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o size.o sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o summary.o sysutils.o unique.o util.o version.o vfonts.o xxxpr.o libs/*o ranlib libR.a gcc -std=gnu99 -export-dynamic -L/usr/local/lib -o R.bin Rmain.o libR.a -L../../lib -lRblas -L/usr/local/lib/gcc44/gcc/x86_64-portbld-freebsd9.0/4.4.5 -L/usr/local/x86_64-portbld-freebsd9.0/lib -L/usr/local/lib/gcc44 -lgfortran -lm /usr/local/lib/libintl.so /usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib -lreadline -llzma -lm -liconv -licuuc -licui18n libR.a(sysutils.o)(.text+0x1d5d): In function `R_system': /usr/local/R-beta/src/main/sysutils.c:289: undefined reference to `WIFEXITED' libR.a(sysutils.o)(.text+0x1d76):/usr/local/R-beta/src/main/sysutils.c:289: undefined reference to `WEXITSTATUS' libR.a(sys-unix.o)(.text+0x475): In function `do_system': /usr/local/R-beta/src/unix/sys-unix.c:290: undefined reference to `WIFEXITED' libR.a(sys-unix.o)(.text+0x551):/usr/local/R-beta/src/unix/sys-unix.c:290: undefined reference to `WEXITSTATUS' *** Error code 1 Stop in /usr/local/R-beta/src/main. *** Error code 1 Stop in /usr/local/R-beta/src/main. *** Error code 1 Stop in /usr/local/R-beta/src. *** Error code 1 Stop in /usr/local/R-beta. ----------------------------------------- Is this a known error? I would really appreciate if someone could give me a hint. Please let me know if more information is needed. Thanks in advance, Rainer Hurling
R-beta_2010-10-02_r53128 fails to compile on FreeBSD
8 messages · Peter Dalgaard, Brian Ripley, Rainer Hurling
On 10/03/2010 04:24 PM, Rainer Hurling wrote:
I tried to compile R-beta_2010-10-02_r53128 on FreeBSD 9.0-CURRENT (amd64) with gcc-4.4.5 and it fails:
Thanks for the report. WIFEXITED/WEXITSTATUS are usually defined in <sys/wait.h> (usually /usr/include/sys/wait.h). Do you have any indication that this might be skipped? (configure output, etc.) I'm not quite sure by which mechanism gcc is expected to include sys/wait.h, but the offending code is inside #ifdef HAVE_SYS_WAIT_H which configure is supposed to set only if it is available and POSIX compatible. Any chance you switched platform features (e.g. upgraded gcc) without reconfiguring? -pd
----------------------------------------- gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c sysutils.c -o sysutils.o sysutils.c: In function 'R_system': sysutils.c:289: warning: implicit declaration of function 'WIFEXITED' sysutils.c:289: warning: implicit declaration of function 'WEXITSTATUS' gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c unique.c -o unique.o gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c util.c -o util.o gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c version.c -o version.o gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c vfonts.c -o vfonts.o gfortran -g -O2 -c xxxpr.f -o xxxpr.o ar cr libR.a CConverters.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o agrep.o apply.o arithmetic.o array.o attrib.o base.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cov.o cum.o dcf.o datetime.o debug.o deparse.o deriv.o devices.o dotcode.o dounzip.o dstruct.o duplicate.o engine.o envir.o errors.o eval.o format.o fourier.o gevents.o gram.o gram-ex.o gramLatex.o gramRd.o graphics.o grep.o identical.o inlined.o inspect.o internet.o iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o match.o memory.o model.o names.o objects.o optim.o optimize.o options.o par.o paste.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o qsort.o random.o raw.o registration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o size.o sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o summary.o sysutils.o unique.o util.o version.o vfonts.o xxxpr.o libs/*o ranlib libR.a gcc -std=gnu99 -export-dynamic -L/usr/local/lib -o R.bin Rmain.o libR.a -L../../lib -lRblas -L/usr/local/lib/gcc44/gcc/x86_64-portbld-freebsd9.0/4.4.5 -L/usr/local/x86_64-portbld-freebsd9.0/lib -L/usr/local/lib/gcc44 -lgfortran -lm /usr/local/lib/libintl.so /usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib -lreadline -llzma -lm -liconv -licuuc -licui18n libR.a(sysutils.o)(.text+0x1d5d): In function `R_system': /usr/local/R-beta/src/main/sysutils.c:289: undefined reference to `WIFEXITED' libR.a(sysutils.o)(.text+0x1d76):/usr/local/R-beta/src/main/sysutils.c:289: undefined reference to `WEXITSTATUS' libR.a(sys-unix.o)(.text+0x475): In function `do_system': /usr/local/R-beta/src/unix/sys-unix.c:290: undefined reference to `WIFEXITED' libR.a(sys-unix.o)(.text+0x551):/usr/local/R-beta/src/unix/sys-unix.c:290: undefined reference to `WEXITSTATUS' *** Error code 1 Stop in /usr/local/R-beta/src/main. *** Error code 1 Stop in /usr/local/R-beta/src/main. *** Error code 1 Stop in /usr/local/R-beta/src. *** Error code 1 Stop in /usr/local/R-beta. ----------------------------------------- Is this a known error? I would really appreciate if someone could give me a hint. Please let me know if more information is needed. Thanks in advance, Rainer Hurling
______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Peter Dalgaard Center for Statistics, Copenhagen Business School Phone: (+45)38153501 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
On Sun, 3 Oct 2010, Rainer Hurling wrote:
I tried to compile R-beta_2010-10-02_r53128 on FreeBSD 9.0-CURRENT (amd64) with gcc-4.4.5 and it fails: ----------------------------------------- gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c sysutils.c -o sysutils.o sysutils.c: In function 'R_system': sysutils.c:289: warning: implicit declaration of function 'WIFEXITED' sysutils.c:289: warning: implicit declaration of function 'WEXITSTATUS' gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c unique.c -o unique.o gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c util.c -o util.o gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c version.c -o version.o gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c vfonts.c -o vfonts.o gfortran -g -O2 -c xxxpr.f -o xxxpr.o ar cr libR.a CConverters.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o agrep.o apply.o arithmetic.o array.o attrib.o base.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cov.o cum.o dcf.o datetime.o debug.o deparse.o deriv.o devices.o dotcode.o dounzip.o dstruct.o duplicate.o engine.o envir.o errors.o eval.o format.o fourier.o gevents.o gram.o gram-ex.o gramLatex.o gramRd.o graphics.o grep.o identical.o inlined.o inspect.o internet.o iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o match.o memory.o model.o names.o objects.o optim.o optimize.o options.o par.o paste.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o qsort.o random.o raw.o registration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o size.o sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o summary.o sysutils.o unique.o util.o version.o vfonts.o xxxpr.o libs/*o ranlib libR.a gcc -std=gnu99 -export-dynamic -L/usr/local/lib -o R.bin Rmain.o libR.a -L../../lib -lRblas -L/usr/local/lib/gcc44/gcc/x86_64-portbld-freebsd9.0/4.4.5 -L/usr/local/x86_64-portbld-freebsd9.0/lib -L/usr/local/lib/gcc44 -lgfortran -lm /usr/local/lib/libintl.so /usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib -lreadline -llzma -lm -liconv -licuuc -licui18n libR.a(sysutils.o)(.text+0x1d5d): In function `R_system': /usr/local/R-beta/src/main/sysutils.c:289: undefined reference to `WIFEXITED' libR.a(sysutils.o)(.text+0x1d76):/usr/local/R-beta/src/main/sysutils.c:289: undefined reference to `WEXITSTATUS' libR.a(sys-unix.o)(.text+0x475): In function `do_system': /usr/local/R-beta/src/unix/sys-unix.c:290: undefined reference to `WIFEXITED' libR.a(sys-unix.o)(.text+0x551):/usr/local/R-beta/src/unix/sys-unix.c:290: undefined reference to `WEXITSTATUS' *** Error code 1 Stop in /usr/local/R-beta/src/main. *** Error code 1 Stop in /usr/local/R-beta/src/main. *** Error code 1 Stop in /usr/local/R-beta/src. *** Error code 1 Stop in /usr/local/R-beta. ----------------------------------------- Is this a known error? I would really appreciate if someone could give me a hint.
Not known, and as it is a POSIX construction almost all OSes have it. Can you try (in sysutils.c and sys-unix.c) replacing #ifdef HAVE_SYS_WAIT_H by #if defined(HAVE_SYS_WAIT_H) && defined(WEXITSTATUS) ?
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
On 03.10.2010 17:10 (UTC+1), Prof Brian Ripley wrote:
On Sun, 3 Oct 2010, Rainer Hurling wrote:
I tried to compile R-beta_2010-10-02_r53128 on FreeBSD 9.0-CURRENT (amd64) with gcc-4.4.5 and it fails: ----------------------------------------- gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c sysutils.c -o sysutils.o sysutils.c: In function 'R_system': sysutils.c:289: warning: implicit declaration of function 'WIFEXITED' sysutils.c:289: warning: implicit declaration of function 'WEXITSTATUS' gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c unique.c -o unique.o gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c util.c -o util.o gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c version.c -o version.o gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c vfonts.c -o vfonts.o gfortran -g -O2 -c xxxpr.f -o xxxpr.o ar cr libR.a CConverters.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o agrep.o apply.o arithmetic.o array.o attrib.o base.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cov.o cum.o dcf.o datetime.o debug.o deparse.o deriv.o devices.o dotcode.o dounzip.o dstruct.o duplicate.o engine.o envir.o errors.o eval.o format.o fourier.o gevents.o gram.o gram-ex.o gramLatex.o gramRd.o graphics.o grep.o identical.o inlined.o inspect.o internet.o iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o match.o memory.o model.o names.o objects.o optim.o optimize.o options.o par.o paste.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o qsort.o random.o raw.o registration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o size.o sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o summary.o sysutils.o unique.o util.o version.o vfonts.o xxxpr.o libs/*o ranlib libR.a gcc -std=gnu99 -export-dynamic -L/usr/local/lib -o R.bin Rmain.o libR.a -L../../lib -lRblas -L/usr/local/lib/gcc44/gcc/x86_64-portbld-freebsd9.0/4.4.5 -L/usr/local/x86_64-portbld-freebsd9.0/lib -L/usr/local/lib/gcc44 -lgfortran -lm /usr/local/lib/libintl.so /usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib -lreadline -llzma -lm -liconv -licuuc -licui18n libR.a(sysutils.o)(.text+0x1d5d): In function `R_system': /usr/local/R-beta/src/main/sysutils.c:289: undefined reference to `WIFEXITED' libR.a(sysutils.o)(.text+0x1d76):/usr/local/R-beta/src/main/sysutils.c:289: undefined reference to `WEXITSTATUS' libR.a(sys-unix.o)(.text+0x475): In function `do_system': /usr/local/R-beta/src/unix/sys-unix.c:290: undefined reference to `WIFEXITED' libR.a(sys-unix.o)(.text+0x551):/usr/local/R-beta/src/unix/sys-unix.c:290: undefined reference to `WEXITSTATUS' *** Error code 1 Stop in /usr/local/R-beta/src/main. *** Error code 1 Stop in /usr/local/R-beta/src/main. *** Error code 1 Stop in /usr/local/R-beta/src. *** Error code 1 Stop in /usr/local/R-beta. ----------------------------------------- Is this a known error? I would really appreciate if someone could give me a hint.
Not known, and as it is a POSIX construction almost all OSes have it.
Hmmm. It seems its implementation in FreeBSD (CURRENT) is a little different from other OSes?
Can you try (in sysutils.c and sys-unix.c) replacing #ifdef HAVE_SYS_WAIT_H by #if defined(HAVE_SYS_WAIT_H) && defined(WEXITSTATUS) ?
Yes, with this patch in both files all works again. I tried it with gcc-4.4.5 and gcc-4.5.2. Is there any chance to get it in the release (R-2.12.0)? As always you hit the goal. Thank you very much for the quick help, Rainer Hurling
On 03.10.2010 17:08 (UTC+1), Peter Dalgaard wrote:
On 10/03/2010 04:24 PM, Rainer Hurling wrote:
I tried to compile R-beta_2010-10-02_r53128 on FreeBSD 9.0-CURRENT (amd64) with gcc-4.4.5 and it fails:
Thanks for the report. WIFEXITED/WEXITSTATUS are usually defined in <sys/wait.h> (usually /usr/include/sys/wait.h). Do you have any indication that this might be skipped? (configure output, etc.)
I think you are right, see the posting of Brian Ripley. With his suggested patch it works again.
I'm not quite sure by which mechanism gcc is expected to include sys/wait.h, but the offending code is inside #ifdef HAVE_SYS_WAIT_H which configure is supposed to set only if it is available and POSIX compatible. Any chance you switched platform features (e.g. upgraded gcc) without reconfiguring?
No, nothing I am aware of. But 9.0-CURRENT is the development platform of FreeBSD and my system is very recent ;-)
-pd
Many thanks for your answer, Rainer Hurling
----------------------------------------- gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c sysutils.c -o sysutils.o sysutils.c: In function 'R_system': sysutils.c:289: warning: implicit declaration of function 'WIFEXITED' sysutils.c:289: warning: implicit declaration of function 'WEXITSTATUS' gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c unique.c -o unique.o gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c util.c -o util.o gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c version.c -o version.o gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c vfonts.c -o vfonts.o gfortran -g -O2 -c xxxpr.f -o xxxpr.o ar cr libR.a CConverters.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o agrep.o apply.o arithmetic.o array.o attrib.o base.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cov.o cum.o dcf.o datetime.o debug.o deparse.o deriv.o devices.o dotcode.o dounzip.o dstruct.o duplicate.o engine.o envir.o errors.o eval.o format.o fourier.o gevents.o gram.o gram-ex.o gramLatex.o gramRd.o graphics.o grep.o identical.o inlined.o inspect.o internet.o iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o match.o memory.o model.o names.o objects.o optim.o optimize.o options.o par.o paste.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o qsort.o random.o raw.o registration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o size.o sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o summary.o sysutils.o unique.o util.o version.o vfonts.o xxxpr.o libs/*o ranlib libR.a gcc -std=gnu99 -export-dynamic -L/usr/local/lib -o R.bin Rmain.o libR.a -L../../lib -lRblas -L/usr/local/lib/gcc44/gcc/x86_64-portbld-freebsd9.0/4.4.5 -L/usr/local/x86_64-portbld-freebsd9.0/lib -L/usr/local/lib/gcc44 -lgfortran -lm /usr/local/lib/libintl.so /usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib -lreadline -llzma -lm -liconv -licuuc -licui18n libR.a(sysutils.o)(.text+0x1d5d): In function `R_system': /usr/local/R-beta/src/main/sysutils.c:289: undefined reference to `WIFEXITED' libR.a(sysutils.o)(.text+0x1d76):/usr/local/R-beta/src/main/sysutils.c:289: undefined reference to `WEXITSTATUS' libR.a(sys-unix.o)(.text+0x475): In function `do_system': /usr/local/R-beta/src/unix/sys-unix.c:290: undefined reference to `WIFEXITED' libR.a(sys-unix.o)(.text+0x551):/usr/local/R-beta/src/unix/sys-unix.c:290: undefined reference to `WEXITSTATUS' *** Error code 1 Stop in /usr/local/R-beta/src/main. *** Error code 1 Stop in /usr/local/R-beta/src/main. *** Error code 1 Stop in /usr/local/R-beta/src. *** Error code 1 Stop in /usr/local/R-beta. ----------------------------------------- Is this a known error? I would really appreciate if someone could give me a hint. Please let me know if more information is needed. Thanks in advance, Rainer Hurling
On Sun, 3 Oct 2010, Rainer Hurling wrote:
...
Is this a known error? I would really appreciate if someone could give me a hint.
Not known, and as it is a POSIX construction almost all OSes have it.
Hmmm. It seems its implementation in FreeBSD (CURRENT) is a little different from other OSes?
Can you try (in sysutils.c and sys-unix.c) replacing #ifdef HAVE_SYS_WAIT_H by #if defined(HAVE_SYS_WAIT_H) && defined(WEXITSTATUS) ?
Yes, with this patch in both files all works again. I tried it with gcc-4.4.5 and gcc-4.5.2. Is there any chance to get it in the release (R-2.12.0)?
Yes, of course. (After a little more testing on other platforms.)
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
On 10/03/2010 05:58 PM, Prof Brian Ripley wrote:
On Sun, 3 Oct 2010, Rainer Hurling wrote: ...
Is this a known error? I would really appreciate if someone could give me a hint.
Not known, and as it is a POSIX construction almost all OSes have it.
Hmmm. It seems its implementation in FreeBSD (CURRENT) is a little different from other OSes?
Can you try (in sysutils.c and sys-unix.c) replacing #ifdef HAVE_SYS_WAIT_H by #if defined(HAVE_SYS_WAIT_H) && defined(WEXITSTATUS) ?
Yes, with this patch in both files all works again. I tried it with gcc-4.4.5 and gcc-4.5.2. Is there any chance to get it in the release (R-2.12.0)?
Yes, of course. (After a little more testing on other platforms.)
Only it strikes me that it might be plugging the wrong hole. I.e., that the real issue is that somehow we're not including sys/wait.h in all cases. Would it perchance also work to have #ifdef HAVE_SYS_WAIT_H #include <sys/wait.h> #endif somewhere at the top of the files that use the two macros (sysutils.c and sys-unix.c AFAICS). "&& defined(WEXITSTATUS)" probably won't break anything that wasn't already broken, but it does insert a default definition that could conflict with the one intended for the OS (that's what include files and macros are for, after all).
Peter Dalgaard Center for Statistics, Copenhagen Business School Phone: (+45)38153501 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
On 03.10.2010 18:38 (UTC+1), Peter Dalgaard wrote:
On 10/03/2010 05:58 PM, Prof Brian Ripley wrote:
On Sun, 3 Oct 2010, Rainer Hurling wrote: ...
Is this a known error? I would really appreciate if someone could give me a hint.
Not known, and as it is a POSIX construction almost all OSes have it.
Hmmm. It seems its implementation in FreeBSD (CURRENT) is a little different from other OSes?
Can you try (in sysutils.c and sys-unix.c) replacing #ifdef HAVE_SYS_WAIT_H by #if defined(HAVE_SYS_WAIT_H)&& defined(WEXITSTATUS) ?
Yes, with this patch in both files all works again. I tried it with gcc-4.4.5 and gcc-4.5.2. Is there any chance to get it in the release (R-2.12.0)?
Yes, of course. (After a little more testing on other platforms.)
Only it strikes me that it might be plugging the wrong hole. I.e., that the real issue is that somehow we're not including sys/wait.h in all cases. Would it perchance also work to have #ifdef HAVE_SYS_WAIT_H #include<sys/wait.h> #endif
Just as a note. This (#include<sys/wait.h>) also works on FreeBSD. Rainer Hurling
somewhere at the top of the files that use the two macros (sysutils.c and sys-unix.c AFAICS). "&& defined(WEXITSTATUS)" probably won't break anything that wasn't already broken, but it does insert a default definition that could conflict with the one intended for the OS (that's what include files and macros are for, after all).