Opened 3 years ago

Closed 3 years ago

#24619 closed defect (fixed)

giac fails to build on SunOS

Reported by: jdemeyer Owned by:
Priority: major Milestone: sage-8.2
Component: packages: standard Keywords:
Cc: frederichan Merged in:
Authors: Jeroen Demeyer Reviewers: Dima Pasechnik
Report Upstream: Reported upstream. Developers acknowledge bug. Work issues:
Branch: 8d93e0c (Commits) Commit: 8d93e0c2b69163c82762b5680e8ef615930f202c
Dependencies: Stopgaps:

Description (last modified by jdemeyer)

On SunOS xenos-sagetest 5.11 11.3 sun4v sparc sun4v with GCC 5.4.0, various problems occur:

1.

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -DIN_GIAC -I. -I.. -I. -I.. -I/var/export/home/jeroen/sage/local/include -g -O2 -m64 -O2 -g -D_XPG6 -fno-strict-aliasing -DGIAC_GENERIC_CONSTANTS -MT input_lexer.lo -MD -MP -MF .deps/input_lexer.Tpo -c input_lexer.cc  -fPIC -DPIC -o .libs/input_lexer.o
In file included from giacPCH.h:45:0,
                 from input_lexer.ll:48:
rpn.h:171:41: error: macro "_ABS" passed 2 arguments, but takes just 1
   gen _ABS(const gen & args,GIAC_CONTEXT);
                                         ^
make[5]: *** [Makefile:759: input_lexer.lo] Error 1

This is because _ABS is a macro on this system. /usr/include/math.h has:

#define     _ABS(x)         ((x) < 0 ? -(x) : (x))

2.

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -DIN_GIAC -I. -I.. -I. -I.. -I/datapool/jeroen/sage/local/include -g -O2 -m64 -O2 -g -D_XPG6 -fno-strict-aliasing -DGIAC_GENERIC_CONSTANTS -MT gen.lo -MD -MP -MF .deps/gen.Tpo -c gen.cc  -fPIC -DPIC -o .libs/gen.o
gen.cc: In function 'giac::gen giac::chartab2gen(char*&, const giac::context*)':
gen.cc:11206:38: error: 'alloca' was not declared in this scope
       char * scopy=(char *)alloca(l+2);

3.

help.cc: In function 'int giac::dir_select(const dirent*)':
help.cc:936:12: error: 'const struct dirent' has no member named 'd_type'
     if (d->d_type==DT_DIR || equalposcomp(subdir_strings,s)){
            ^
help.cc:936:20: error: 'DT_DIR' was not declared in this scope
     if (d->d_type==DT_DIR || equalposcomp(subdir_strings,s)){

Reported upstream: http://xcas.e.ujf-grenoble.fr/XCAS/viewtopic.php?f=4&t=1998

Change History (24)

comment:1 Changed 3 years ago by jdemeyer

  • Description modified (diff)

comment:2 Changed 3 years ago by jdemeyer

  • Description modified (diff)

comment:3 Changed 3 years ago by jdemeyer

  • Cc frederichan added
  • Description modified (diff)
  • Report Upstream changed from N/A to None of the above - read trac for reasoning.

comment:4 Changed 3 years ago by jdemeyer

  • Branch set to u/jdemeyer/giac_fails_to_build_on_sunos

comment:5 Changed 3 years ago by git

  • Commit set to 7b9bf5becdb1f759cf709e04ba37a5fb20c567b3

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

7b9bf5bFix giac build on SunOS

comment:6 Changed 3 years ago by frederichan

comment:7 Changed 3 years ago by jdemeyer

  • Description modified (diff)
  • Report Upstream changed from None of the above - read trac for reasoning. to Reported upstream. No feedback yet.

comment:8 Changed 3 years ago by jdemeyer

Note that this patch here is untested. I'll let you know whether it works.

comment:9 Changed 3 years ago by jdemeyer

  • Description modified (diff)

The patch is needed but not sufficient. There are other build issues.

comment:10 Changed 3 years ago by jdemeyer

  • Description modified (diff)

comment:11 Changed 3 years ago by git

  • Commit changed from 7b9bf5becdb1f759cf709e04ba37a5fb20c567b3 to 6fed476e9c6ea3214846bd576f20690266002122

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

6fed476Fix giac build on SunOS

comment:12 Changed 3 years ago by git

  • Commit changed from 6fed476e9c6ea3214846bd576f20690266002122 to 77738e4bdf40eb0d400af11ec5537d88d4b59810

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

77738e4Fix giac build on SunOS

comment:13 Changed 3 years ago by git

  • Commit changed from 77738e4bdf40eb0d400af11ec5537d88d4b59810 to 677ea8ea36ead30ad9a75a40566d4cc5816a2ba7

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

677ea8eFix giac build on SunOS

comment:14 Changed 3 years ago by jdemeyer

This patch fixes issues 1 and 2.

comment:15 Changed 3 years ago by git

  • Commit changed from 677ea8ea36ead30ad9a75a40566d4cc5816a2ba7 to 8d93e0c2b69163c82762b5680e8ef615930f202c

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

8d93e0cFix giac build on SunOS

comment:16 Changed 3 years ago by jdemeyer

  • Authors set to Jeroen Demeyer

For issue 3, I simply disabled part of the help functionality on systems not supporting DT_DIR.

comment:17 follow-up: Changed 3 years ago by dimpase

let me see if with this I get a complete build - it's the last package that fails in my build, as far as I see (I have done a fix for R).

comment:18 Changed 3 years ago by dimpase

  • Status changed from new to needs_review

needs review?

comment:19 Changed 3 years ago by jdemeyer

Yes. Needs review.

comment:20 Changed 3 years ago by dimpase

  • Reviewers set to Dima Pasechnik
  • Status changed from needs_review to positive_review

This works on Sun for me too. Send it to the bots!

comment:21 in reply to: ↑ 17 Changed 3 years ago by jdemeyer

Replying to dimpase:

let me see if with this I get a complete build - it's the last package that fails in my build, as far as I see

Do you have a fix for fplll? If so, please put it on #24618.

comment:22 Changed 3 years ago by dimpase

It did build for me without any patches, perhaps it is gcc 7.2 vs 5.4 here?

comment:23 Changed 3 years ago by jdemeyer

  • Description modified (diff)
  • Report Upstream changed from Reported upstream. No feedback yet. to Reported upstream. Developers acknowledge bug.

comment:24 Changed 3 years ago by vbraun

  • Branch changed from u/jdemeyer/giac_fails_to_build_on_sunos to 8d93e0c2b69163c82762b5680e8ef615930f202c
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.