无法使用OS X El Capitan版本10.11.6构建xgboost

时间:2016-10-30 22:26:14

标签: macos gcc homebrew osx-elcapitan xgboost

我正在尝试在Mac OS X El Capitan版本10.11.6上构建xgboost,但是,它给了我不支持的选项' - fopenmp'

clang: error: unsupported option '-fopenmp' make: *** [build/learner.o] Error 1

我使用brew更新了Xcode和gcc,并将gcc版本作为

gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/6.2.0/libexec/gcc/x86_64-apple-darwin15.6.0/6.2.0/lto-wrapper Target: x86_64-apple-darwin15.6.0 Configured with: ../configure --build=x86_64-apple-darwin15.6.0 --prefix=/usr/local/Cellar/gcc/6.2.0 --libdir=/usr/local/Cellar/gcc/6.2.0/lib/gcc/6 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-6 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --with-build-config=bootstrap-debug --disable-werror --with-pkgversion='Homebrew gcc 6.2.0 --without-multilib' --with-bugurl=https://github.com/Homebrew/homebrew/issues --enable-plugin --disable-nls --disable-multilib Thread model: posix gcc version 6.2.0 (Homebrew gcc 6.2.0 --without-multilib)

如果我遗漏了构建xgboost时导致错误的任何内容,请告诉我。谢谢。

1 个答案:

答案 0 :(得分:0)

更好的安装方法是使用存储库根目录中的public class CustomAdapter extends ArrayAdapter { private static ArrayList<SearchResults> searchArrayList; private LayoutInflater mInflater; public CustomAdapter(Context context, int custom_row_view, ArrayList<SearchResults> results) { super(context,custom_row_view,results); searchArrayList = results; mInflater = LayoutInflater.from(context); } public int getCount() { return searchArrayList.size(); } public Object getItem(int position) { return searchArrayList.get(position); } public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder; if (convertView == null) { convertView = mInflater.inflate(R.layout.custom_row_view, null); holder = new ViewHolder(); holder.txtName = (TextView) convertView.findViewById(R.id.name); holder.txtTimeOfMeeting = (TextView) convertView.findViewById(R.id.timeOfMeeting); holder.txtDescription = (TextView) convertView.findViewById(R.id.description); holder.txtDate = (TextView) convertView.findViewById(R.id.date); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } holder.txtName.setText(searchArrayList.get(position).getName()); holder.txtTimeOfMeeting.setText(searchArrayList.get(position).getTimeOfMeeting()); holder.txtDescription.setText(searchArrayList.get(position).getDescription()); holder.txtDate.setText(searchArrayList.get(position).getDate()); return convertView; } static class ViewHolder { TextView txtName; TextView txtTimeOfMeeting; TextView txtDescription; TextView txtDate; } } 脚本。

如果它不可用(例如在Mac中)

,这将禁用OpenMP支持

或者

build.sh复制为make/minimum.mk以手动禁用openmp支持