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

Support Solaris. #6578

Merged
merged 3 commits into from Jan 7, 2021
Merged

Support Solaris. #6578

merged 3 commits into from Jan 7, 2021

Conversation

trivialfis
Copy link
Member

Related: #6542

I ran a test on https://builder.r-hub.io/ mentioned by @hcho3 . The rabit issue is fixed, but the toolchain itself on the test machine seems a bit weird.

os: Oracle Solaris 10, x86, 32 bit, R-release. A snippet of log is copied here, complete log is uploaded at the end.

./dmlc-core/include/dmlc/./base.h:207:65: note: #pragma message: Warning: FILE OFFSET BITS defined to be 32 bit
 #pragma message("Warning: FILE OFFSET BITS defined to be 32 bit")
                                                                 ^
In file included from /opt/csw/include/c++/5.5.0/tr1/random:46:0,
                 from /opt/csw/include/c++/5.5.0/parallel/random_number.h:36,
                 from /opt/csw/include/c++/5.5.0/parallel/partition.h:38,
                 from /opt/csw/include/c++/5.5.0/parallel/quicksort.h:36,
                 from /opt/csw/include/c++/5.5.0/parallel/sort.h:48,
                 from /opt/csw/include/c++/5.5.0/parallel/algo.h:45,
                 from /opt/csw/include/c++/5.5.0/parallel/algorithm:37,
                 from ./include/xgboost/base.h:59,
                 from ./include/xgboost/logging.h:14,
                 from xgboost_custom.cc:5:
/opt/csw/include/c++/5.5.0/tr1/cmath: In function ‘float std::tr1::acosh(float)’:
/opt/csw/include/c++/5.5.0/tr1/cmath:424:18: error: ‘float std::tr1::acosh(float)’ conflicts with a previous declaration
   acosh(float __x)
                  ^
In file included from /opt/csw/lib/gcc/i386-pc-solaris2.10/5.5.0/include-fixed/math.h:23:0,
                 from /opt/csw/include/c++/5.5.0/cmath:44,
                 from ./include/xgboost/base.h:11,
                 from ./include/xgboost/logging.h:14,
                 from xgboost_custom.cc:5:
/usr/include/iso/math_c99.h:754:15: note: previous declaration ‘float std::acosh(float)’
  inline float acosh(float __X) { return __acoshf(__X); }
               ^
In file included from /opt/csw/include/c++/5.5.0/tr1/random:46:0,
                 from /opt/csw/include/c++/5.5.0/parallel/random_number.h:36,
                 from /opt/csw/include/c++/5.5.0/parallel/partition.h:38,
                 from /opt/csw/include/c++/5.5.0/parallel/quicksort.h:36,
                 from /opt/csw/include/c++/5.5.0/parallel/sort.h:48,
                 from /opt/csw/include/c++/5.5.0/parallel/algo.h:45,
                 from /opt/csw/include/c++/5.5.0/parallel/algorithm:37,
                 from ./include/xgboost/base.h:59,
                 from ./include/xgboost/logging.h:14,
                 from xgboost_custom.cc:5:
/opt/csw/include/c++/5.5.0/tr1/cmath: In function ‘long double std::tr1::acosh(long double)’:
/opt/csw/include/c++/5.5.0/tr1/cmath:428:24: error: ‘long double std::tr1::acosh(long double)’ conflicts with a previous declaration
   acosh(long double __x)
                        ^
In file included from /opt/csw/lib/gcc/i386-pc-solaris2.10/5.5.0/include-fixed/math.h:23:0,
                 from /opt/csw/include/c++/5.5.0/cmath:44,
                 from ./include/xgboost/base.h:11,
                 from ./include/xgboost/logging.h:14,
                 from xgboost_custom.cc:5:
/usr/include/iso/math_c99.h:796:21: note: previous declaration ‘long double std::acosh(long double)’
  inline long double acosh(long double __X) { return __acoshl(__X); }

log.zip

@hcho3
Copy link
Collaborator

hcho3 commented Jan 6, 2021

This line is pulling in TR1, which is likely the culprit of the error:

#if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 8) || __GNUC__ > 4) && \
!defined(__CUDACC__)
#include <parallel/algorithm>

I will try to patch that line and re-submit to r-hub.

#include <sys/sockio.h>
#endif // defined(__sun)

#if defined(__sun) || defined(sun)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to check both __sun and sun, according to dmlc/dmlc-core#549

Copy link
Member Author

@trivialfis trivialfis Jan 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad that you found the test site!

Copy link
Collaborator

@hcho3 hcho3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the patch, XGBoost built successfully on R-Hub Solaris:

Screen Shot 2021-01-06 at 1 24 01 PM

@hcho3
Copy link
Collaborator

hcho3 commented Jan 6, 2021

Let's backport this patch to the release_1.3.0 branch as well.

@trivialfis
Copy link
Member Author

After the patch, XGBoost built successfully on R-Hub Solaris:

Awesome!

Let's backport this patch to the release_1.3.0 branch as well.

Will list it.

@trivialfis trivialfis mentioned this pull request Jan 6, 2021
6 tasks
@codecov-io
Copy link

codecov-io commented Jan 6, 2021

Codecov Report

Merging #6578 (2a20e66) into master (b2246ae) will increase coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6578      +/-   ##
==========================================
+ Coverage   80.10%   80.16%   +0.05%     
==========================================
  Files          13       13              
  Lines        3604     3604              
==========================================
+ Hits         2887     2889       +2     
+ Misses        717      715       -2     
Impacted Files Coverage Δ
python-package/xgboost/tracker.py 93.98% <0.00%> (-1.13%) ⬇️
python-package/xgboost/dask.py 81.38% <0.00%> (+0.84%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b2246ae...5857804. Read the comment docs.

@trivialfis trivialfis merged commit 8747885 into dmlc:master Jan 7, 2021
@trivialfis trivialfis deleted the solaris branch January 7, 2021 01:05
trivialfis added a commit to trivialfis/xgboost that referenced this pull request Jan 9, 2021
* Add system header.

* Remove use of TR1 on Solaris

Co-authored-by: Hyunsu Cho <chohyu01@cs.washington.edu>
trivialfis added a commit to trivialfis/xgboost that referenced this pull request Jan 10, 2021
* Add system header.

* Remove use of TR1 on Solaris

Co-authored-by: Hyunsu Cho <chohyu01@cs.washington.edu>
trivialfis added a commit that referenced this pull request Jan 10, 2021
* Add system header.

* Remove use of TR1 on Solaris

Co-authored-by: Hyunsu Cho <chohyu01@cs.washington.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants