pycurl.h: fatal error: openssl/ssl.h: No such file or directory

If you encounter this error trying to install a pip module or compile a program under the console you surely miss OpenSSL development packages!
pip also may build a packages in your system and it could depend on generic library headers like in this case OpenSSL, which the installer (pip) won’t bring them and it will output an error as you can see

myuser@srv # sudo pip install pycurl pygeoip psutil
Collecting pycurl
  Using cached https://files.pythonhosted.org/packages/e8/e4/0dbb8735407189f00b33d84122b9be52c790c7c3b25286826f4e1bdb7bde/pycurl-7.43.0.2.tar.gz
Requirement already satisfied (use --upgrade to upgrade): pygeoip in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): psutil in /usr/lib/python2.7/dist-packages
Building wheels for collected packages: pycurl
  Running setup.py bdist_wheel for pycurl ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-AbCshS/pycurl/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpqVNq1upip-wheel- --python-tag cp27:
  Using curl-config (libcurl 7.47.0)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-2.7
  creating build/lib.linux-x86_64-2.7/curl
  copying python/curl/__init__.py -> build/lib.linux-x86_64-2.7/curl
  running build_ext
  building 'pycurl' extension
  creating build/temp.linux-x86_64-2.7
  creating build/temp.linux-x86_64-2.7/src
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPYCURL_VERSION="7.43.0.2" -DHAVE_CURL_SSL=1 -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_SSL=1 -I/usr/include/python2.7 -c src/docstrings.c -o build/temp.linux-x86_64-2.7/src/docstrings.o
  In file included from src/docstrings.c:4:0:
  src/pycurl.h:164:28: fatal error: openssl/ssl.h: No such file or directory
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for pycurl
  Running setup.py clean for pycurl
Failed to build pycurl
Installing collected packages: pycurl
  Running setup.py install for pycurl ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-AbCshS/pycurl/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-oea_jq-record/install-record.txt --single-version-externally-managed --compile:
    Using curl-config (libcurl 7.47.0)
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/curl
    copying python/curl/__init__.py -> build/lib.linux-x86_64-2.7/curl
    running build_ext
    building 'pycurl' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/src
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPYCURL_VERSION="7.43.0.2" -DHAVE_CURL_SSL=1 -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_SSL=1 -I/usr/include/python2.7 -c src/docstrings.c -o build/temp.linux-x86_64-2.7/src/docstrings.o
    In file included from src/docstrings.c:4:0:
    src/pycurl.h:164:28: fatal error: openssl/ssl.h: No such file or directory
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-AbCshS/pycurl/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-oea_jq-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-AbCshS/pycurl/
You are using pip version 8.1.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command

Keep on reading!

Compilation failure in configure with syntax error near unexpected token -Wall,WFLAGS and AX_CHECK_COMPILE_FLAG

If you are trying to build program and in the configure stage you got something like this:

./configure: line 6849: syntax error near unexpected token `-Wall,WFLAGS="$WFLAGS -Wall"'
./configure: line 6849: `AX_CHECK_COMPILE_FLAG(-Wall,WFLAGS="$WFLAGS -Wall")'

You are missing

autoconf-archive

Check your system for the package including this software (a collection of freely re-usable Autoconf macros): https://www.gnu.org/software/autoconf-archive/

In our case we were experiencing a missing dependency for “app-admin/metalog” in Gentoo Linux system. Probably there is a bug, because autoconf-archive is not in the dependency graph of “app-admin/metalog” (app-admin/metalog-20181125), but it should be included.
Such kind of error could occur in all Linux systems. Here is what to install in

  • CentOS 7
    yum install autoconf-archive
    
  • Ubuntu 16/17/18+
  • apt install autoconf-archive
    
  • Gentoo Linux
  • emerge -va autoconf-archive
    

Gentoo distcc compilation error – relocation R_X86_64_32 against .rodata.str1.1 can not be used when making a shared object

In our Gentoo systems we use distcc (distributed builds for C, C++ and Objective C) to build the packages fast! But after we upgraded to GNU GCC 8.2 some of the packages we tried to build failed with:

 0:02.86 /usr/lib64/distcc/bin/x86_64-pc-linux-gnu-gcc -std=gnu99 -o nsinstall_real -DXP_UNIX -O2  host_nsinstall.o host_pathsub.o
 0:02.88 /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: host_nsinstall.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
 0:02.88 host_nsinstall.o: error adding symbols: Bad value
 0:02.88 collect2: error: ld returned 1 exit status
 0:02.88 distcc[528] ERROR: compile (null) on localhost failed

As you know the GNU GCC must be (same versions and) compiled with the same flags on the two systems you use it – the local machine and the distcc build server. So we were pretty sure the GNU GCC is the same version in our local machine and the build distcc server, because the USE flags were the same in /etc/portage/make.conf but executing

gcc -v

showed there is a slight difference.
The local machine

srv.local ~ # gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/8.2.0/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/8.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-8.2.0-r3/work/gcc-8.2.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/8.2.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/8.2.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/8.2.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/8.2.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include/g++-v8 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/8.2.0/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 8.2.0-r3 p1.4' --disable-esp --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libmudflap --disable-libssp --disable-libmpx --disable-systemtap --enable-vtable-verify --enable-libvtv --enable-lto --without-isl --enable-libsanitizer --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 8.2.0 (Gentoo 8.2.0-r3 p1.4)

The distcc server:

compile ~ # gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/8.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-8.2.0-r3/work/gcc-8.2.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/8.2.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/8.2.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/8.2.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/8.2.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include/g++-v8 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/8.2.0/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 8.2.0-r3 p1.4' --disable-esp --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libmudflap --disable-libssp --disable-libmpx --disable-systemtap --enable-vtable-verify --enable-libvtv --enable-lto --without-isl --enable-libsanitizer --disable-default-pie --enable-default-ssp
Thread model: posix
gcc version 8.2.0 (Gentoo 8.2.0-r3 p1.4)

The difference is in local has –enable-default-pie and distcc server has –disable-default-pie

Investigating farther we discovered that the USE make.conf flag is “pie” – https://packages.gentoo.org/useflags/pie and this flag is for “Build programs as Position Independent Executables (a security hardening technique)”. And the problem was the default value on the local machine it was enabled by default and for the remote it was disabled by default –

SO the real problem was the different profiles set on the two servers!

The remote distcc server no one checked and switched to the new portage profile 17 so the server still used the old portage profile 13, where the flag “pie” was excluded.
So change the profile to the same as the local machine and recompile GNU GCC package:

compile ~ # eselect profile set 12
compile ~ # emerge -va gcc

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] sys-devel/gcc-8.2.0-r3:8.2.0::gentoo  USE="cxx fortran (multilib) nls nptl openmp pch (pie*) sanitize ssp vtv (-altivec) -debug -doc (-fixed-point) -go -graphite (-hardened) (-jit) (-libssp) -mpx -objc -objc++ -objc-gc -pgo -regression-test -systemtap -vanilla" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] Yes

As you can see the new flag enabled by “(pie*)”.

So be sure when using distcc the Gentoo portage profiles should be the same on the local and the remote distcc systems or you can end up with fatal differences and compilation errors!

Rebuild the official Ubuntu kernel – Ubuntu 16.04 LTS

There are multiple reasons to rebuild the official kernel of a Linux distro but this is not the purpose of this article

just cannot miss the chance to write that all the kernels are built therefore optimized for the very first 64bit Intel/AMD processor! But come on who wants the most important piece of software to be optimized not for his new and expensive processor but for one released 15 years ago???

. Here we are going to show you how to recompile the latest official Ubuntu kernel of Ubuntu 16.04 LTS – the one, which comes with the apt packages system, because this kernel comes with the latest and greatest patches of the Ubuntu team. You should not confuse this howto with the one, which compile a vanilla kernel or the mainline kernel from http://kernel.ubuntu.com/~kernel-ppa/mainline/. So if you want a new kernel or the latest from kernel.org this is the right tutorial for Ubuntu – Build your own kernel under Ubuntu using mainline (latest) kernel. The official latest kernel in the Ubuntu repository is not always the latest one from kernel.org, but you can be sure it is probably most secure one, because there are additional modifications, configurations and tests by the team. Here you can see what versions of the kernel are the officials in Ubuntu: https://wiki.ubuntu.com/Kernel/Support

Keep on reading!

Missing pkg-config results in configure error: possibly undefined macro

This small article is for you who wonder why a configure script under Linux failed with an error like:

configure.ac:204: error: possibly undefined macro: AC_MSG_ERROR
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:216: error: possibly undefined macro: AC_CHECK_LIB
configure.ac:328: error: possibly undefined macro: AC_CHECK_HEADER
autoreconf: /usr/bin/autoconf failed with exit status: 1
 FAILED 

So autoreconf failed with missing macros, but you just saw you had the latest version and no clue what is wrong with the code you tried to compile!
In most cases the problem is trivial – you are missing the

pkg-config

It is a helper tool used when compiling. It helps to have the correct compiler options and not to hard-coded them in your files. So search for this tool in your Linux distro and install it.

Under CentOS 7

yum install pkgconfig

Under Ubuntu/Debian

apt-get install pkg-config

Under Gentoo

emerge -v dev-util/pkgconfig

vmware-modules failed with too many arguments to function smp_call_function and smp_call_function_single

vmware-modules is really tough to compile on a bleeding edge kernel like last versions from kernel.org When a new kernel is out the chances you cannot vmware modules are really big and if you look at the patches a gentoo build applies at present 40 (at the end you can see a log from Gentoo) an almost all begin with

kernel_version-[why_is_needed].patch

But apparently not only the patches are needed the CFLAGS are also important. And if you include

-fomit-frame-pointer in CFLAGS/CXXFLAGS

you’ll get into troubles! And this is not specific to Gentoo and probably not to specific kernel version, because there are reports from 2012 and before 2012! So if you have the following error:

In file included from /var/tmp/portage/app-emulation/vmware-modules-308.5.9/work/vmmon-only/linux/driver.c:69:0:
/var/tmp/portage/app-emulation/vmware-modules-308.5.9/work/vmmon-only/linux/driver.c: In function ‘LinuxDriverEstimateTSCkHz’:
/var/tmp/portage/app-emulation/vmware-modules-308.5.9/work/vmmon-only/linux/vmmonInt.h:88:15: error: too many arguments to function ‘smp_call_function_single’
               smp_call_function_single(cpu, fn, info, 1, wait)
               ^
/var/tmp/portage/app-emulation/vmware-modules-308.5.9/work/vmmon-only/linux/driver.c:208:10: note: in expansion of macro ‘compat_smp_call_function_single’
    err = compat_smp_call_function_single(0, LinuxDriverEstimateTSCkHzWork,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/src/linux-4.16.3-gentoo/include/linux/percpu.h:7:0,
                 from /usr/src/linux-4.16.3-gentoo/include/linux/percpu-rwsem.h:7,
                 from /usr/src/linux-4.16.3-gentoo/include/linux/fs.h:33,
                 from /usr/src/linux-4.16.3-gentoo/include/linux/highmem.h:5,
                 from /var/tmp/portage/app-emulation/vmware-modules-308.5.9/work/vmmon-only/linux/driver.c:25:
/usr/src/linux-4.16.3-gentoo/include/linux/smp.h:32:5: note: declared here
 int smp_call_function_single(int cpuid, smp_call_func_t func, void *info,
     ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/tmp/portage/app-emulation/vmware-modules-308.5.9/work/vmmon-only/linux/driver.c:69:0:
/var/tmp/portage/app-emulation/vmware-modules-308.5.9/work/vmmon-only/linux/driver.c: In function ‘LinuxDriverSyncCallOnEachCPU’:
/var/tmp/portage/app-emulation/vmware-modules-308.5.9/work/vmmon-only/linux/vmmonInt.h:34:50: error: too many arguments to function ‘smp_call_function’
 #define compat_smp_call_function(fn, info, wait) smp_call_function(fn, info, 1, wait)
                                                  ^
/var/tmp/portage/app-emulation/vmware-modules-308.5.9/work/vmmon-only/linux/driver.c:1224:4: note: in expansion of macro ‘compat_smp_call_function’
    compat_smp_call_function(LinuxDriverSyncCallHook, &args, 0);
    ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/src/linux-4.16.3-gentoo/include/linux/percpu.h:7:0,
                 from /usr/src/linux-4.16.3-gentoo/include/linux/percpu-rwsem.h:7,
                 from /usr/src/linux-4.16.3-gentoo/include/linux/fs.h:33,
                 from /usr/src/linux-4.16.3-gentoo/include/linux/highmem.h:5,
                 from /var/tmp/portage/app-emulation/vmware-modules-308.5.9/work/vmmon-only/linux/driver.c:25:
/usr/src/linux-4.16.3-gentoo/include/linux/smp.h:100:5: note: declared here
 int smp_call_function(smp_call_func_t func, void *info, int wait);
     ^~~~~~~~~~~~~~~~~
distcc[32709] ERROR: compile /var/tmp/portage/app-emulation/vmware-modules-308.5.9/work/vmmon-only/linux/driver.c on localhost failed
make[3]: *** [/usr/src/linux-4.16.3-gentoo/scripts/Makefile.build:325: /var/tmp/portage/app-emulation/vmware-modules-308.5.9/work/vmmon-only/linux/driver.o] Error 1
make[3]: *** Waiting for unfinished jobs....

Revise your CFLAGS/CXXFLAGS environment variables and remove “-fomit-frame-pointer”.

In our system we used (manual compile/install):

export CFLAGS="-O2 -msse -msse2 -mssse3 -march=core2 -pipe"
export CXXFLAGS="${CFLAGS}"
export LDFLAGS="-Wl,-O1"

or for Gentoo configuration file /etc/portage/make.conf

CFLAGS="-O2 -msse -msse2 -mssse3 -march=core2 -pipe"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1"

* All needed patches in Gentoo for compiling vmware-modules 308.5.9 ( with vmware-player-12.5.9.7535481 ) successfully in a modern kernel

>>> Preparing source in /var/tmp/portage/app-emulation/vmware-modules-308.5.9/work ...
 * Applying 308-makefile-kernel-dir.patch ...                [ ok ]
 * Applying 308-makefile-include.patch ...                   [ ok ]
 * Applying 308-netdevice.patch ...                          [ ok ]
 * Applying 308-apic.patch ...                               [ ok ]
 * Applying 308-3.10-00-dentry.patch ...                     [ ok ]
 * Applying 308-3.10-01-inode.patch ...                      [ ok ]
 * Applying 308-3.10-02-control.patch ...                    [ ok ]
 * Applying 308-3.10-03-inline.patch ...                     [ ok ]
 * Applying 308-3.11-00-readdir.patch ...                    [ ok ]
 * Applying 308-3.11-01-filldir.patch ...                    [ ok ]
 * Applying 308-3.15-00-vsock.patch ...                      [ ok ]
 * Applying 308-3.18-00-version-redefined.patch ...          [ ok ]
 * Applying 308-3.19-00-compat-namei.patch ...               [ ok ]
 * Applying 308-3.19-02-vmblock-path.patch ...               [ ok ]
 * Applying 308-3.19-04-iovec.patch ...                      [ ok ]
 * Applying 308-3.19-05-vmci_qpair.patch ...                 [ ok ]
 * Applying 308-3.19-06-vsock.patch ...                      [ ok ]
 * Applying 308-3.19-07-vsock.patch ...                      [ ok ]
 * Applying 308-4.01-00-vsock.patch ...                      [ ok ]
 * Applying 308-4.02-00-nd_set_link.patch ...                [ ok ]
 * Applying 308-4.02-01-sk_alloc.patch ...                   [ ok ]
 * Applying 308-4.03-00-vmci-misc_deregister.patch ...       [ ok ]
 * Applying 308-4.05-00-vmblock-follow_link.patch ...        [ ok ]
 * Applying 308-4.06-00-user-pages.patch ...                 [ ok ]
 * Applying 308-4.07-01-readlink_copy.patch ...              [ ok ]
 * Applying 308-4.08-00-vmmon-fix-page-accounting.patch ...  [ ok ]
 * Applying 308-4.09-00-user-pages.patch ...                 [ ok ]
 * Applying 308-4.10-00-generic_readlink.patch ...           [ ok ]
 * Applying 308-4.11-00-missing-headers.patch ...            [ ok ]
 * Applying 308-4.11-01-vsock-lockdep.patch ...              [ ok ]
 * Applying 308-4.12-00-vmblock-current_time.patch ...       [ ok ]
 * Applying 308-4.12-01-vmci-do_once.patch ...               [ ok ]
 * Applying 308-4.12-02-vmci-pci_enable_msix.patch ...       [ ok ]
 * Applying 308-4.13-00-vmnet-refcount.patch ...             [ ok ]
 * Applying 308-4.13-01-vmmon-fix-page-accounting.patch ...  [ ok ]
 * Applying 308-4.14-00-vmmon-global-page-state.patch ...    [ ok ]
 * Applying 308-4.14-01-deprecated-asm-uaccess.patch ...     [ ok ]
 * Applying 308-4.15-00-init_timer.patch ...                 [ ok ]
 * Applying 308-4.16-00-vmblock-iversion.patch ...           [ ok ]
>>> Source prepared.

In fact if you come from another linux distro and need some of the patches you could always download them if you need – just paste the name of the patch file in let’s say google and you’ll get the patch or you can always add vmware overlay, but you should have Gentoo.

Compilation failure with Value too large for defined data type in Gentoo

It has happened several times for the last 10 years, a program to fail during the configure stage with a strange error:

checking whether we are cross compiling...  * /var/tmp/portage/sys-apps/sandbox-2.12/work/sandbox-2.12/libsandbox/libsandbox.c:check_syscall():968: failure (Value too large for defined data type):
 * ISE: fopen_wr(conftest.out)
        abs_path: (null)
        res_path: /var/tmp/portage/sys-apps/sandbox-2.13/work/sandbox-2.13-abi_x86_32.x86/conftest.out
configure: error: in `/var/tmp/portage/sys-apps/sandbox-2.13/work/sandbox-2.13-abi_x86_32.x86':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

It’s like the “./conftest” is made and the execution failed?

Last package it happened was when trying to build

sys-apps/sandbox-2.13

but it is not especially related to this Gentoo package or even to Gentoo!

And the debug.log is not informative neither:

configure:3793: ./conftest
/usr/lib32/libsandbox.so(+0xb238)[0xf7738238]
/usr/lib32/libsandbox.so(+0xb2c7)[0xf77382c7]
/usr/lib32/libsandbox.so(+0x40b1)[0xf77310b1]
/usr/lib32/libsandbox.so(+0x421e)[0xf773121e]
/usr/lib32/libsandbox.so(fopen+0x55)[0xf7733e45]
./conftest(+0x4a1)[0x565754a1]
/lib32/libc.so.6(__libc_start_main+0xf6)[0xf7561956]
./conftest(+0x508)[0x56575508]
/proc/23882/cmdline: ./conftest 

/var/tmp/portage/sys-apps/sandbox-2.13/work/sandbox-2.13/configure: line 3795: 23882 Aborted                 ./conftest$ac_cv_exeext
configure:3797: $? = 134
configure:3804: error: in `/var/tmp/portage/sys-apps/sandbox-2.13/work/sandbox-2.13-abi_x86_32.x86':
configure:3806: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

After some debugging it turned out the problem was the

XFS filesystem

The root was formatted with XFS and therefore

/var/tmp/portage

where all the compilation occurred was on a xfs formatted partition!
It is easy to resolve the issue, just mount your “/var/tmp/portage” on another filesystem, if you do not have any spare devices or places with other filesystem, you could always mount it using

tmpfs

(using your memory for the directory) like this:

mount -t tmpfs -o size=4096m tmpfs /var/tmp/portage/

You can adjust the size with “size” parameter, but most of the program require a way below 4G of space. And do not forget mounting your build directory in the tmpfs speeds up the emerge process significantly!

And probably it is a good idea before mounting it to delete all old sub-directories, because they can take much space and they are left there after failed compilations of packages.

rm -R /var/tmp/portage/*

PS: It was the same with compilation of

sys-devel/gcc-7.3.0

configure: updating cache ./config.cache
 * /var/tmp/portage/sys-apps/sandbox-2.13/work/sandbox-2.13/libsandbox/libsandbox.c:check_syscall():968: failure (Value too large for defined data type):
 * ISE: fopen_wr(conftest.val)
        abs_path: (null)
        res_path: /var/tmp/portage/sys-devel/gcc-7.3.0/work/build/x86_64-pc-linux-gnu/32/libgomp/conftest.val
configure: error: unsupported system, cannot find sizeof (omp_lock_t)
make[2]: *** [Makefile:20106: configure-stage1-target-libgomp] Error 1
make[2]: Leaving directory '/var/tmp/portage/sys-devel/gcc-7.3.0/work/build'
make[1]: *** [Makefile:22189: stage1-bubble] Error 2
make[1]: Leaving directory '/var/tmp/portage/sys-devel/gcc-7.3.0/work/build'
make: *** [Makefile:22521: bootstrap-lean] Error 2
 * ERROR: sys-devel/gcc-7.3.0::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sys-devel/gcc-7.3.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/gcc-7.3.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-devel/gcc-7.3.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-7.3.0/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-devel/gcc-7.3.0/work/build'
 * S: '/var/tmp/portage/sys-devel/gcc-7.3.0/work/gcc-7.3.0'
 * 
 * Please include /var/tmp/portage/sys-devel/gcc-7.3.0/work/gcc-build-logs.tar.bz2 in your bug report.
 * 

>>> Failed to emerge sys-devel/gcc-7.3.0, Log file:

The problem is the same, compiling on

XFS filesystem

Install ethminer in a machine with NVIDIA video card under Ubuntu 16.04 LTS (only commands , real output and benchmark)

Here is the Part 2 of the Install ethminer in a machine with NVIDIA video card under Ubuntu 16.04 LTS. The Part 2 is just all executed commands, which could be put in a bash file to automate the installation of the machine and the compilation of the ethminer and the output for a much clear example with real life example with output. Here you’ll find no explanations, which are included in the “Part 1” (see link above).
So only three sections here, first the bash commands and then the output of executed commands, only the installation of the packets with apt-get is trimmed because of the long output! The example is executing first sudo su to get to the root user, if you do not feel good you can skip the root and adjust it to the user you like with sudo. The second is the output of the commands and the third is the benchmark and hardware information of the machine used for this howto.

1. Commands to execute

sudo su
cd
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
dpkg -i /root/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
add-apt-repository -y ppa:graphics-drivers/ppa
apt-get update -y
apt-get -y install git cmake libleveldb-dev libjsoncpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential cuda libcrypto++-dev libjsonrpccpp-dev
reboot
sudo su
cd
echo "termcapinfo xterm* ti@:te@" > /root/.screenrc
screen -R ethminer-mining
git clone https://github.com/ethereum-mining/ethminer
mkdir -p /root/ethminer/build
cd /root/ethminer/build
export CFLAGS="-O2 -march=native -msse3 -fomit-frame-pointer -pipe"
export CHOST="x86_64-pc-linux-gnu"
export CXXFLAGS="${CFLAGS}"
export LDFLAGS="-Wl,-O1"
cmake .. -DETHASHCUDA=ON -DETHASHCL=ON
make -j 8
cd /root/ethminer/build/ethminer/
export GPU_FORCE_64BIT_PTR=0
export GPU_MAX_HEAP_SIZE=100
export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
export GPU_SINGLE_ALLOC_PERCENT=100
./ethminer -U -F http://<your-pool-address>/<your-ethereum-address>

2. Here is the all real output (just the configuration of Pool address and the ethereum address are changed for security reasons, use your own)

 

ubuntu@mylocal:~$ sudo su
root@ip-172-31-3-105:~# wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
--2018-02-23 09:25:04--  http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
Resolving developer.download.nvidia.com (developer.download.nvidia.com)... 192.229.211.70, 2606:2800:21f:3aa:dcf:37b:1ed6:1fb
Connecting to developer.download.nvidia.com (developer.download.nvidia.com)|192.229.211.70|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2820 (2.8K) [application/x-deb]
Saving to: ‘cuda-repo-ubuntu1604_9.1.85-1_amd64.deb’

cuda-repo-ubuntu1604_9.1.85-1_amd64.deb    100%[========================================================================================>]   2.75K  --.-KB/s    in 0s       
                                                                                                                                                                            
2018-02-23 09:25:04 (332 MB/s) - ‘cuda-repo-ubuntu1604_9.1.85-1_amd64.deb’ saved [2820/2820]                                                                                
root@ip-172-31-3-105:~# sudo dpkg -i /root/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
Selecting previously unselected package cuda-repo-ubuntu1604.
(Reading database ... 51107 files and directories currently installed.)
Preparing to unpack .../cuda-repo-ubuntu1604_9.1.85-1_amd64.deb ...
Unpacking cuda-repo-ubuntu1604 (9.1.85-1) ...
Setting up cuda-repo-ubuntu1604 (9.1.85-1) ...

The public CUDA GPG key does not appear to be installed.
To install the key, run this command:
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub

root@ip-172-31-3-105:~# sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
Executing: /tmp/tmp.Z1DJgpLxrY/gpg.1.sh --fetch-keys
http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
gpg: key 7FA2AF80: public key "cudatools <cudatools@nvidia.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
root@ip-172-31-3-105:~# sudo dpkg -i /root/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
(Reading database ... 51110 files and directories currently installed.)
Preparing to unpack .../cuda-repo-ubuntu1604_9.1.85-1_amd64.deb ...
Unpacking cuda-repo-ubuntu1604 (9.1.85-1) over (9.1.85-1) ...
Setting up cuda-repo-ubuntu1604 (9.1.85-1) ...
root@ip-172-31-3-105:~# sudo add-apt-repository -y ppa:graphics-drivers/ppa
gpg: keyring `/tmp/tmpq7st7q7i/secring.gpg' created
gpg: keyring `/tmp/tmpq7st7q7i/pubring.gpg' created
gpg: requesting key 1118213C from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpq7st7q7i/trustdb.gpg: trustdb created
gpg: key 1118213C: public key "Launchpad PPA for Graphics Drivers Team" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
root@ip-172-31-3-105:~# sudo apt-get update -y
Hit:1 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]                 
Get:3 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]                                                                                   
Get:4 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial/main Sources [868 kB]                                                                                          
Ign:5 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64  InRelease                                  
Get:6 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64  Release [564 B]                            
Get:7 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial/restricted Sources [4,808 B]                                                  
Get:8 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial/universe Sources [7,728 kB]                                                   
Get:9 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64  Release.gpg [801 B]                                                
Get:10 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]                                                                         
Get:11 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial InRelease [24.3 kB]                                                      
Get:12 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial/multiverse Sources [179 kB]                                                                   
Get:13 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [7,532 kB]                      
Get:14 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64  Packages [100 kB]                                             
Get:15 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial/universe Translation-en [4,354 kB]                                                            
Get:16 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [144 kB]                                                    
Get:17 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial/multiverse Translation-en [106 kB]           
Get:18 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/main Sources [298 kB]                      
Get:19 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/restricted Sources [2,524 B]
Get:20 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/universe Sources [191 kB]         
Get:21 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/multiverse Sources [7,968 B]   
Get:22 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [734 kB]      
Get:23 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/main Translation-en [305 kB]    
Get:24 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial/main amd64 Packages [11.9 kB]           
Get:25 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [7,560 B]   
Get:26 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/restricted Translation-en [2,272 B]                           
Get:27 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [591 kB]                                    
Get:28 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [239 kB]                           
Get:29 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [16.2 kB]                              
Get:30 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/multiverse Translation-en [8,052 B]                           
Get:31 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-backports/main Sources [3,432 B]                                            
Get:32 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-backports/universe Sources [4,904 B]                                 
Get:33 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [4,836 B]                              
Get:34 http://security.ubuntu.com/ubuntu xenial-security/main Sources [116 kB]                                                     
Get:35 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-backports/main Translation-en [3,220 B]                           
Get:36 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [6,628 B]                                          
Get:37 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-backports/universe Translation-en [3,768 B]                                     
Get:38 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial/main Translation-en [4,224 B]                                                   
Get:39 http://security.ubuntu.com/ubuntu xenial-security/restricted Sources [2,116 B]   
Get:40 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [59.1 kB]
Get:41 http://security.ubuntu.com/ubuntu xenial-security/multiverse Sources [1,516 B]
Get:42 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [458 kB]
Get:43 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [197 kB]
Get:44 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [7,224 B]
Get:45 http://security.ubuntu.com/ubuntu xenial-security/restricted Translation-en [2,152 B]
Get:46 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [319 kB]
Get:47 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [119 kB]
Get:48 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [3,208 B]
Get:49 http://security.ubuntu.com/ubuntu xenial-security/multiverse Translation-en [1,408 B]
Fetched 25.1 MB in 3s (6,275 kB/s)                                  
Reading package lists... Done
root@ip-172-31-3-105:~# sudo apt-get install git cmake libleveldb-dev libjsoncpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential cuda libcrypto++-dev libjsonrpccpp-dev -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
git is already the newest version (1:2.7.4-0ubuntu1.3).
The following additional packages will be installed:
  adwaita-icon-theme apg aptdaemon aspell aspell-en at-spi2-core autotools-dev avahi-daemon avahi-utils bbswitch-dkms binutils bluez bluez-obexd ca-certificates-java
  cheese-common cmake-data colord colord-data cpp cpp-5 cracklib-runtime crda cuda-9-1 cuda-command-line-tools-9-1 cuda-compiler-9-1 cuda-cublas-9-1 cuda-cublas-dev-9-1
  cuda-cudart-9-1 cuda-cudart-dev-9-1 cuda-cufft-9-1 cuda-cufft-dev-9-1 cuda-cuobjdump-9-1 cuda-cupti-9-1 cuda-curand-9-1 cuda-curand-dev-9-1 cuda-cusolver-9-1
  cuda-cusolver-dev-9-1 cuda-cusparse-9-1 cuda-cusparse-dev-9-1 cuda-demo-suite-9-1 cuda-documentation-9-1 cuda-driver-dev-9-1 cuda-drivers cuda-gdb-9-1
  cuda-gpu-library-advisor-9-1 cuda-libraries-9-1 cuda-libraries-dev-9-1 cuda-license-9-1 cuda-memcheck-9-1 cuda-misc-headers-9-1 cuda-npp-9-1 cuda-npp-dev-9-1
  cuda-nsight-9-1 cuda-nvcc-9-1 cuda-nvdisasm-9-1 cuda-nvgraph-9-1 cuda-nvgraph-dev-9-1 cuda-nvml-dev-9-1 cuda-nvprof-9-1 cuda-nvprune-9-1 cuda-nvrtc-9-1
  cuda-nvrtc-dev-9-1 cuda-nvtx-9-1 cuda-nvvp-9-1 cuda-runtime-9-1 cuda-samples-9-1 cuda-toolkit-9-1 cuda-tools-9-1 cuda-visual-tools-9-1 cups-pk-helper curl dbus-x11
  dconf-cli dconf-gsettings-backend dconf-service default-jre default-jre-headless desktop-file-utils dictionaries-common diffstat dkms dpkg-dev emacsen-common enchant
  evolution-data-server evolution-data-server-common evolution-data-server-online-accounts fakeroot fontconfig fontconfig-config fonts-dejavu-core fonts-dejavu-extra
  freeglut3 freeglut3-dev g++ g++-5 gcc gcc-5 gcc-5-base gcr geoclue geoclue-ubuntu-geoip gettext gir1.2-atk-1.0 gir1.2-freedesktop gir1.2-gdkpixbuf-2.0
  gir1.2-gnomekeyring-1.0 gir1.2-gtk-3.0 gir1.2-ibus-1.0 gir1.2-notify-0.7 gir1.2-packagekitglib-1.0 gir1.2-pango-1.0 gkbd-capplet glib-networking glib-networking-common
  glib-networking-services gnome-bluetooth gnome-desktop3-data gnome-keyring gnome-menus gnome-power-manager gnome-screensaver gnome-session-bin
  gnome-settings-daemon-schemas gnome-user-guide gnome-user-share gsettings-desktop-schemas gsettings-ubuntu-schemas gstreamer1.0-clutter-3.0 gstreamer1.0-plugins-base
  gstreamer1.0-plugins-good gstreamer1.0-x gvfs gvfs-backends gvfs-common gvfs-daemons gvfs-libs hardening-includes hicolor-icon-theme humanity-icon-theme hunspell-en-us
  hwdata ibus ibus-gtk ibus-gtk3 icu-devtools im-config indicator-applet indicator-application indicator-bluetooth indicator-datetime indicator-keyboard
  indicator-messages indicator-power indicator-session indicator-sound intltool-debian ippusbxd iputils-arping iw java-common lib32gcc1 libaa1 libaccount-plugin-1.0-0
  libaccount-plugin-generic-oauth libaccount-plugin-google libaccounts-glib0 libaccounts-qt5-1 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl
  libappindicator3-1 libapt-pkg-perl libarchive-zip-perl libarchive13 libargtable2-0 libasan2 libasound2 libasound2-data libasound2-plugins libaspell15 libasprintf-dev
  libassuan0 libasyncns0 libatasmart4 libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatomic1 libatspi2.0-0 libauthen-sasl-perl libavahi-client3 libavahi-common-data
  libavahi-common3 libavahi-core7 libavahi-glib1 libavc1394-0 libbluetooth3 libboost-atomic-dev libboost-atomic1.58-dev libboost-atomic1.58.0 libboost-chrono-dev
  libboost-chrono1.58-dev libboost-chrono1.58.0 libboost-context-dev libboost-context1.58-dev libboost-context1.58.0 libboost-coroutine-dev libboost-coroutine1.58-dev
  libboost-coroutine1.58.0 libboost-date-time-dev libboost-date-time1.58-dev libboost-date-time1.58.0 libboost-dev libboost-exception-dev libboost-exception1.58-dev
  libboost-filesystem-dev libboost-filesystem1.58-dev libboost-filesystem1.58.0 libboost-graph-dev libboost-graph-parallel-dev libboost-graph-parallel1.58-dev
  libboost-graph-parallel1.58.0 libboost-graph1.58-dev libboost-graph1.58.0 libboost-iostreams-dev libboost-iostreams1.58-dev libboost-iostreams1.58.0 libboost-locale-dev
  libboost-locale1.58-dev libboost-locale1.58.0 libboost-log-dev libboost-log1.58-dev libboost-log1.58.0 libboost-math-dev libboost-math1.58-dev libboost-math1.58.0
  libboost-mpi-dev libboost-mpi-python-dev libboost-mpi-python1.58-dev libboost-mpi-python1.58.0 libboost-mpi1.58-dev libboost-mpi1.58.0 libboost-program-options-dev
  libboost-program-options1.58-dev libboost-program-options1.58.0 libboost-python-dev libboost-python1.58-dev libboost-python1.58.0 libboost-random-dev
  libboost-random1.58-dev libboost-random1.58.0 libboost-regex-dev libboost-regex1.58-dev libboost-regex1.58.0 libboost-serialization-dev libboost-serialization1.58-dev
  libboost-serialization1.58.0 libboost-signals-dev libboost-signals1.58-dev libboost-signals1.58.0 libboost-system-dev libboost-system1.58-dev libboost-system1.58.0
  libboost-test-dev libboost-test1.58-dev libboost-test1.58.0 libboost-thread-dev libboost-thread1.58-dev libboost-thread1.58.0 libboost-timer-dev libboost-timer1.58-dev
  libboost-timer1.58.0 libboost-tools-dev libboost-wave-dev libboost-wave1.58-dev libboost-wave1.58.0 libboost1.58-dev libboost1.58-tools-dev libc-dev-bin libc6 libc6-dev
  libc6-i386 libcaca0 libcairo-gobject2 libcairo2 libcamel-1.2-54 libcanberra-gtk3-0 libcanberra-gtk3-module libcanberra-pulse libcanberra0 libcapnp-0.5.3 libcc1-0
  libcdio-cdda1 libcdio-paranoia1 libcdio13 libcdparanoia0 libcgi-fast-perl libcgi-pm-perl libcgmanager0 libcheese-gtk25 libcheese8 libcilkrts5 libclass-accessor-perl
  libclone-perl libclutter-1.0-0 libclutter-1.0-common libclutter-gst-3.0-0 libclutter-gtk-1.0-0 libcogl-common libcogl-pango20 libcogl-path20 libcogl20 libcolord2
  libcolorhug2 libcrack2 libcroco3 libcrypto++9v5 libcuda1-390 libcups2 libcurl3 libcurl3-gnutls libdaemon0 libdata-alias-perl libdatrie1 libdbusmenu-glib4
  libdbusmenu-gtk3-4 libdconf1 libdigest-hmac-perl libdouble-conversion1v5 libdpkg-perl libdrm-amdgpu1 libdrm-common libdrm-dev libdrm-intel1 libdrm-nouveau2
  libdrm-radeon1 libdrm2 libdv4 libebackend-1.2-10 libebook-1.2-16 libebook-contacts-1.2-2 libecal-1.2-19 libedata-book-1.2-25 libedata-cal-1.2-28 libedataserver-1.2-21
  libegl1-mesa libemail-valid-perl libenchant1c2a libencode-locale-perl libepoxy0 libevdev2 libexif12 libexpat1-dev libexporter-tiny-perl libfakeroot libfcgi-perl
  libfcitx-config4 libfcitx-gclient0 libfcitx-utils0 libfftw3-single3 libfile-basedir-perl libfile-fcntllock-perl libflac8 libfontconfig1 libfontenc1 libgbm1 libgcc-5-dev
  libgck-1-0 libgcr-3-common libgcr-base-3-1 libgcr-ui-3-1 libgcrypt20-dev libgd3 libgdata-common libgdata22 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgee-0.8-2
  libgeoclue0 libgeocode-glib0 libgeonames0 libgettextpo-dev libgettextpo0 libgif7 libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libglib2.0-bin
  libglu1-mesa libglu1-mesa-dev libgmpxx4ldbl libgnome-bluetooth13 libgnome-desktop-3-12 libgnome-keyring-common libgnome-keyring0 libgnome-menu-3-0 libgnomekbd-common
  libgnomekbd8 libgnutls-dev libgnutls28-dev libgnutlsxx28 libgoa-1.0-0b libgoa-1.0-common libgomp1 libgpg-error-dev libgphoto2-6 libgphoto2-l10n libgphoto2-port12
  libgraphite2-3 libgstreamer-plugins-base1.0-0 libgstreamer-plugins-good1.0-0 libgstreamer1.0-0 libgtk-3-0 libgtk-3-bin libgtk-3-common libgtk2.0-0 libgtk2.0-bin
  libgtk2.0-common libgtop-2.0-10 libgtop2-common libgudev-1.0-0 libgusb2 libgweather-3-6 libgweather-common libharfbuzz-icu0 libharfbuzz0b libhtml-parser-perl
  libhtml-tagset-perl libhttp-date-perl libhttp-message-perl libhunspell-1.3-0 libhwloc-dev libhwloc-plugins libhwloc5 libhyphen0 libibus-1.0-5 libibverbs-dev libibverbs1
  libical1a libice-dev libice6 libicu-dev libidn11-dev libido3-0.1-0 libiec61883-0 libieee1284-3 libimobiledevice6 libindicator3-7 libinput-bin libinput10 libio-html-perl
  libio-pty-perl libio-socket-inet6-perl libio-socket-ssl-perl libio-string-perl libipc-run-perl libipc-system-simple-perl libisl15 libitm1 libjack-jackd2-0 libjansson4
  libjavascriptcoregtk-4.0-18 libjbig0 libjpeg-turbo8 libjpeg8 libjson-glib-1.0-0 libjson-glib-1.0-common libjsoncpp1 libjsonrpccpp-client0 libjsonrpccpp-common0
  libjsonrpccpp-server0 libjsonrpccpp-stub0 liblcms2-2 libldb1 libleveldb1v5 liblightdm-gobject-1-0 liblist-moreutils-perl libllvm5.0 liblsan0 libltdl-dev libltdl7
  liblwp-mediatypes-perl libmailtools-perl libmbim-glib4 libmbim-proxy libmicrohttpd10 libmirclient9 libmircommon7 libmircore1 libmirprotobuf3 libmm-glib0 libmpc3 libmpx0
  libmtdev1 libmtp-common libmtp-runtime libmtp9 libnautilus-extension1a libndp0 libnet-dns-perl libnet-domain-tld-perl libnet-ip-perl libnet-libidn-perl
  libnet-smtp-ssl-perl libnet-ssleay-perl libnih-dbus1 libnl-3-200 libnl-genl-3-200 libnm-glib4 libnm-gtk-common libnm-gtk0 libnm-util2 libnm0 libnma-common libnma0
  libnotify4 libnspr4 libnss-mdns libnss3 libnss3-nssdb libnuma-dev libnuma1 liboauth0 libogg0 libopenmpi-dev libopenmpi1.10 libopus0 liborc-0.4-0 libp11-kit-dev
  libp11-kit-gnome-keyring libpackagekit-glib2-16 libpam-gnome-keyring libpanel-applet0 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpangoxft-1.0-0
  libparse-debianchangelog-perl libpciaccess0 libpcre16-3 libpcsclite1 libperlio-gzip-perl libpixman-1-0 libplist3 libprotobuf-lite9v5 libproxy1v5 libpthread-stubs0-dev
  libpulse-mainloop-glib0 libpulse0 libpulsedsp libpwquality-common libpwquality1 libpython-dev libpython-stdlib libpython2.7 libpython2.7-dev libpython2.7-minimal
  libpython2.7-stdlib libqmi-glib5 libqmi-proxy libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5opengl5 libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5sql5
  libqt5sql5-sqlite libqt5svg5 libqt5webkit5 libqt5widgets5 libqt5xml5 libquadmath0 libraw1394-11 libreadline6-dev librest-0.7-0 librsvg2-2 librsvg2-common libsamplerate0
  libsane libsane-common libsecret-1-0 libsecret-common libsensors4 libshout3 libsignon-extension1 libsignon-glib1 libsignon-plugins-common1 libsignon-qt5-1 libsm-dev
  libsm6 libsmbclient libsnappy1v5 libsndfile1 libsocket6-perl libsoup-gnome2.4-1 libsoup2.4-1 libspeex1 libspeexdsp1 libstdc++-5-dev libstdc++6 libsub-name-perl
  libtag1v5 libtag1v5-vanilla libtalloc2 libtasn1-6 libtasn1-6-dev libtasn1-doc libtdb1 libtevent0 libtext-levenshtein-perl libthai-data libthai0 libtheora0 libtiff5
  libtimedate-perl libtimezonemap-data libtimezonemap1 libtinfo-dev libtool libtsan0 libtxc-dxtn-s2tc0 libubsan0 libudisks2-0 libunistring0 libunity-control-center1
  libunity-settings-daemon1 libupower-glib3 liburi-perl liburl-dispatcher1 libusbmuxd4 libv4l-0 libv4lconvert0 libvdpau1 libvisual-0.4-0 libvorbis0a libvorbisenc2
  libvorbisfile3 libvpx3 libwacom-bin libwacom-common libwacom2 libwavpack1 libwayland-client0 libwayland-cursor0 libwayland-egl1-mesa libwayland-server0 libwbclient0
  libwebkit2gtk-4.0-37 libwebkit2gtk-4.0-37-gtk2 libwebp5 libwebrtc-audio-processing-0 libx11-dev libx11-doc libx11-xcb-dev libx11-xcb1 libxau-dev libxaw7 libxcb-dri2-0
  libxcb-dri2-0-dev libxcb-dri3-0 libxcb-dri3-dev libxcb-glx0 libxcb-glx0-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-present-dev libxcb-present0 libxcb-randr0
  libxcb-randr0-dev libxcb-render-util0 libxcb-render0 libxcb-render0-dev libxcb-shape0 libxcb-shape0-dev libxcb-shm0 libxcb-sync-dev libxcb-sync1 libxcb-util1
  libxcb-xfixes0 libxcb-xfixes0-dev libxcb-xkb1 libxcb1-dev libxcomposite1 libxcursor1 libxdamage-dev libxdamage1 libxdmcp-dev libxext-dev libxfixes-dev libxfixes3
  libxfont1 libxft2 libxi-dev libxi6 libxinerama1 libxkbcommon-x11-0 libxkbcommon0 libxkbfile1 libxklavier16 libxmu-dev libxmu-headers libxmu6 libxnvctrl0 libxpm4
  libxrandr2 libxrender1 libxshmfence-dev libxshmfence1 libxslt1.1 libxt-dev libxt6 libxtst6 libxv1 libxxf86dga1 libxxf86vm-dev libxxf86vm1 libyaml-libyaml-perl libyelp0
  lightdm lintian linux-libc-dev make manpages-dev mesa-vdpau-drivers mobile-broadband-provider-info modemmanager mountall mousetweaks mpi-default-bin mpi-default-dev
  nautilus-data nettle-dev network-manager network-manager-gnome network-manager-pptp notification-daemon nvidia-390 nvidia-390-dev nvidia-modprobe nvidia-opencl-icd-390
  nvidia-prime nvidia-settings openjdk-8-jre openjdk-8-jre-headless openmpi-bin openmpi-common p11-kit p11-kit-modules patchutils pinentry-gnome3 pkg-config
  policykit-1-gnome ppp pptp-linux pulseaudio pulseaudio-module-x11 pulseaudio-utils python python-dev python-minimal python-talloc python2.7 python2.7-dev
  python2.7-minimal python3-aptdaemon python3-aptdaemon.pkcompat python3-bs4 python3-cairo python3-cups python3-cupshelpers python3-defer python3-html5lib python3-lxml
  python3-xdg python3-xkit qttranslations5-l10n rtkit samba-libs screen-resolution-extra session-migration signon-keyring-extension signon-plugin-oauth2
  signon-plugin-password signon-ui signon-ui-service signon-ui-x11 signond sound-theme-freedesktop system-config-printer-common system-config-printer-gnome
  system-config-printer-udev t1utils ubuntu-mono ubuntu-system-service ubuntu-touch-sounds udisks2 unity-control-center unity-control-center-faces
  unity-control-center-signon unity-greeter unity-settings-daemon upower upstart usb-modeswitch usb-modeswitch-data usbmuxd vdpau-driver-all wamerican wireless-regdb
  wpasupplicant x11-common x11-utils x11-xkb-utils x11proto-core-dev x11proto-damage-dev x11proto-dri2-dev x11proto-fixes-dev x11proto-gl-dev x11proto-input-dev
  x11proto-kb-dev x11proto-xext-dev x11proto-xf86vidmode-dev xfonts-base xfonts-encodings xfonts-utils xorg-sgml-doctools xserver-common xserver-xorg xserver-xorg-core
  xserver-xorg-input-all xserver-xorg-input-evdev xserver-xorg-input-synaptics xserver-xorg-input-vmmouse xserver-xorg-input-wacom xserver-xorg-legacy xtrans-dev yelp
  yelp-xsl zlib1g-dev
Suggested packages:
  aspell-doc spellutils avahi-autoipd bumblebee binutils-doc codeblocks eclipse ninja-build colord-sensor-argyll cpp-doc gcc-5-locales default-java-plugin debian-keyring
  evolution evolution-data-server-dbg g++-multilib g++-5-multilib gcc-5-doc libstdc++6-5-dbg gcc-multilib autoconf automake flex bison gdb gcc-doc gcc-5-multilib
  libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan2-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx0-dbg libquadmath0-dbg gettext-doc
  autopoint apache2-bin libapache2-mod-dnssd samba-common hunspell openoffice.org-hunspell | openoffice.org-core ibus-clutter ibus-doc ibus-qt4 click powerd
  unity-system-compositor zenity unity-greeter-session-broadcast lrzip alsa-utils libgssapi-perl libboost-doc graphviz libboost1.58-doc gccxml libmpfrc++-dev libntl-dev
  xsltproc doxygen docbook-xml docbook-xsl default-jdk fop glibc-doc libcanberra-gtk0 libgles2-mesa | libgles2 cups-common libcurl4-doc libcurl3-dbg libkrb5-dev
  libldap2-dev librtmp-dev libdv-bin oss-compat libenchant-voikko fcitx libfftw3-bin libfftw3-dev libgcrypt20-doc libgd-tools gmp-doc libgmp10-doc libmpfr-dev gnutls-doc
  gnutls-bin guile-gnutls gphoto2 libvisual-0.4-plugins gstreamer1.0-tools libdata-dump-perl libhwloc-contrib-plugins libice-doc icu-doc libusbmuxd-tools jackd2
  libjsonrpccpp-tools liblcms2-utils leveldb-doc libtool-doc avahi-autoipd | zeroconf opennmpi-doc opus-tools libhtml-template-perl libxml-simple-perl pcscd
  libqt5libqgtk2 qt5-image-formats-plugins qtwayland5 libraw1394-doc readline-doc librsvg2-bin hplip libsane-extras sane-utils lm-sensors libsm-doc speex libstdc++-5-doc
  automaken gfortran | fortran95-compiler gcj-jdk libwww-perl url-dispatcher libxcb-doc libxext-doc libxt-doc bindfs binutils-multiarch libtext-template-perl make-doc
  nautilus network-manager-openconnect-gnome network-manager-openvpn-gnome network-manager-vpnc-gnome network-manager-pptp-gnome icedtea-8-plugin fonts-ipafont-gothic
  fonts-ipafont-mincho fonts-wqy-microhei fonts-wqy-zenhei fonts-indic gfortran openmpi-checkpoint pinentry-doc pavumeter pavucontrol paman paprefs python-doc python-tk
  python2.7-doc binfmt-support python3-genshi python3-lxml-dbg python-lxml-doc python3-smbc reiserfsprogs exfat-utils libcanberra-gtk-module x11-xserver-utils
  lightdm-remote-session-freerdp lightdm-remote-session-uccsconfigure remote-login-service metacity | x-window-manager upstart-monitor comgt wvdial libvdpau-va-gl1
  nvidia-vdpau-driver nvidia-legacy-340xx-vdpau-driver wpagui libengine-pkcs11-openssl mesa-utils xfonts-100dpi | xfonts-75dpi xfonts-scalable gpointing-device-settings
  touchfreeze xinput
The following NEW packages will be installed:
  adwaita-icon-theme apg aptdaemon aspell aspell-en at-spi2-core autotools-dev avahi-daemon avahi-utils bbswitch-dkms binutils bluez bluez-obexd build-essential
  ca-certificates-java cheese-common cmake cmake-data colord colord-data cpp cpp-5 cracklib-runtime crda cuda cuda-9-1 cuda-command-line-tools-9-1 cuda-compiler-9-1
  cuda-cublas-9-1 cuda-cublas-dev-9-1 cuda-cudart-9-1 cuda-cudart-dev-9-1 cuda-cufft-9-1 cuda-cufft-dev-9-1 cuda-cuobjdump-9-1 cuda-cupti-9-1 cuda-curand-9-1
  cuda-curand-dev-9-1 cuda-cusolver-9-1 cuda-cusolver-dev-9-1 cuda-cusparse-9-1 cuda-cusparse-dev-9-1 cuda-demo-suite-9-1 cuda-documentation-9-1 cuda-driver-dev-9-1
  cuda-drivers cuda-gdb-9-1 cuda-gpu-library-advisor-9-1 cuda-libraries-9-1 cuda-libraries-dev-9-1 cuda-license-9-1 cuda-memcheck-9-1 cuda-misc-headers-9-1 cuda-npp-9-1
  cuda-npp-dev-9-1 cuda-nsight-9-1 cuda-nvcc-9-1 cuda-nvdisasm-9-1 cuda-nvgraph-9-1 cuda-nvgraph-dev-9-1 cuda-nvml-dev-9-1 cuda-nvprof-9-1 cuda-nvprune-9-1 cuda-nvrtc-9-1
  cuda-nvrtc-dev-9-1 cuda-nvtx-9-1 cuda-nvvp-9-1 cuda-runtime-9-1 cuda-samples-9-1 cuda-toolkit-9-1 cuda-tools-9-1 cuda-visual-tools-9-1 cups-pk-helper dbus-x11 dconf-cli
  dconf-gsettings-backend dconf-service default-jre default-jre-headless desktop-file-utils dictionaries-common diffstat dkms dpkg-dev emacsen-common enchant
  evolution-data-server evolution-data-server-common evolution-data-server-online-accounts fakeroot fontconfig fontconfig-config fonts-dejavu-core fonts-dejavu-extra
  freeglut3 freeglut3-dev g++ g++-5 gcc gcc-5 gcr geoclue geoclue-ubuntu-geoip gettext gir1.2-atk-1.0 gir1.2-freedesktop gir1.2-gdkpixbuf-2.0 gir1.2-gnomekeyring-1.0
  gir1.2-gtk-3.0 gir1.2-ibus-1.0 gir1.2-notify-0.7 gir1.2-packagekitglib-1.0 gir1.2-pango-1.0 gkbd-capplet glib-networking glib-networking-common glib-networking-services
  gnome-bluetooth gnome-desktop3-data gnome-keyring gnome-menus gnome-power-manager gnome-screensaver gnome-session-bin gnome-settings-daemon-schemas gnome-user-guide
  gnome-user-share gsettings-desktop-schemas gsettings-ubuntu-schemas gstreamer1.0-clutter-3.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-x gvfs
  gvfs-backends gvfs-common gvfs-daemons gvfs-libs hardening-includes hicolor-icon-theme humanity-icon-theme hunspell-en-us hwdata ibus ibus-gtk ibus-gtk3 icu-devtools
  im-config indicator-applet indicator-application indicator-bluetooth indicator-datetime indicator-keyboard indicator-messages indicator-power indicator-session
  indicator-sound intltool-debian ippusbxd iputils-arping iw java-common lib32gcc1 libaa1 libaccount-plugin-1.0-0 libaccount-plugin-generic-oauth libaccount-plugin-google
  libaccounts-glib0 libaccounts-qt5-1 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libappindicator3-1 libapt-pkg-perl libarchive-zip-perl
  libarchive13 libargtable2-0 libasan2 libasound2 libasound2-data libasound2-plugins libaspell15 libasprintf-dev libassuan0 libasyncns0 libatasmart4 libatk-bridge2.0-0
  libatk1.0-0 libatk1.0-data libatomic1 libatspi2.0-0 libauthen-sasl-perl libavahi-client3 libavahi-common-data libavahi-common3 libavahi-core7 libavahi-glib1
  libavc1394-0 libbluetooth3 libboost-all-dev libboost-atomic-dev libboost-atomic1.58-dev libboost-atomic1.58.0 libboost-chrono-dev libboost-chrono1.58-dev
  libboost-chrono1.58.0 libboost-context-dev libboost-context1.58-dev libboost-context1.58.0 libboost-coroutine-dev libboost-coroutine1.58-dev libboost-coroutine1.58.0
  libboost-date-time-dev libboost-date-time1.58-dev libboost-date-time1.58.0 libboost-dev libboost-exception-dev libboost-exception1.58-dev libboost-filesystem-dev
  libboost-filesystem1.58-dev libboost-filesystem1.58.0 libboost-graph-dev libboost-graph-parallel-dev libboost-graph-parallel1.58-dev libboost-graph-parallel1.58.0
  libboost-graph1.58-dev libboost-graph1.58.0 libboost-iostreams-dev libboost-iostreams1.58-dev libboost-iostreams1.58.0 libboost-locale-dev libboost-locale1.58-dev
  libboost-locale1.58.0 libboost-log-dev libboost-log1.58-dev libboost-log1.58.0 libboost-math-dev libboost-math1.58-dev libboost-math1.58.0 libboost-mpi-dev
  libboost-mpi-python-dev libboost-mpi-python1.58-dev libboost-mpi-python1.58.0 libboost-mpi1.58-dev libboost-mpi1.58.0 libboost-program-options-dev
  libboost-program-options1.58-dev libboost-program-options1.58.0 libboost-python-dev libboost-python1.58-dev libboost-python1.58.0 libboost-random-dev
  libboost-random1.58-dev libboost-random1.58.0 libboost-regex-dev libboost-regex1.58-dev libboost-regex1.58.0 libboost-serialization-dev libboost-serialization1.58-dev
  libboost-serialization1.58.0 libboost-signals-dev libboost-signals1.58-dev libboost-signals1.58.0 libboost-system-dev libboost-system1.58-dev libboost-system1.58.0
  libboost-test-dev libboost-test1.58-dev libboost-test1.58.0 libboost-thread-dev libboost-thread1.58-dev libboost-thread1.58.0 libboost-timer-dev libboost-timer1.58-dev
  libboost-timer1.58.0 libboost-tools-dev libboost-wave-dev libboost-wave1.58-dev libboost-wave1.58.0 libboost1.58-dev libboost1.58-tools-dev libc-dev-bin libc6-dev
  libc6-i386 libcaca0 libcairo-gobject2 libcairo2 libcamel-1.2-54 libcanberra-gtk3-0 libcanberra-gtk3-module libcanberra-pulse libcanberra0 libcapnp-0.5.3 libcc1-0
  libcdio-cdda1 libcdio-paranoia1 libcdio13 libcdparanoia0 libcgi-fast-perl libcgi-pm-perl libcgmanager0 libcheese-gtk25 libcheese8 libcilkrts5 libclass-accessor-perl
  libclone-perl libclutter-1.0-0 libclutter-1.0-common libclutter-gst-3.0-0 libclutter-gtk-1.0-0 libcogl-common libcogl-pango20 libcogl-path20 libcogl20 libcolord2
  libcolorhug2 libcrack2 libcroco3 libcrypto++-dev libcrypto++9v5 libcuda1-390 libcups2 libcurl3 libcurl4-gnutls-dev libdaemon0 libdata-alias-perl libdatrie1
  libdbusmenu-glib4 libdbusmenu-gtk3-4 libdconf1 libdigest-hmac-perl libdouble-conversion1v5 libdpkg-perl libdrm-amdgpu1 libdrm-common libdrm-dev libdrm-intel1
  libdrm-nouveau2 libdrm-radeon1 libdv4 libebackend-1.2-10 libebook-1.2-16 libebook-contacts-1.2-2 libecal-1.2-19 libedata-book-1.2-25 libedata-cal-1.2-28
  libedataserver-1.2-21 libegl1-mesa libemail-valid-perl libenchant1c2a libencode-locale-perl libepoxy0 libevdev2 libexif12 libexpat1-dev libexporter-tiny-perl
  libfakeroot libfcgi-perl libfcitx-config4 libfcitx-gclient0 libfcitx-utils0 libfftw3-single3 libfile-basedir-perl libfile-fcntllock-perl libflac8 libfontconfig1
  libfontenc1 libgbm1 libgcc-5-dev libgck-1-0 libgcr-3-common libgcr-base-3-1 libgcr-ui-3-1 libgcrypt20-dev libgd3 libgdata-common libgdata22 libgdk-pixbuf2.0-0
  libgdk-pixbuf2.0-common libgee-0.8-2 libgeoclue0 libgeocode-glib0 libgeonames0 libgettextpo-dev libgettextpo0 libgif7 libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx
  libglapi-mesa libglib2.0-bin libglu1-mesa libglu1-mesa-dev libgmp-dev libgmpxx4ldbl libgnome-bluetooth13 libgnome-desktop-3-12 libgnome-keyring-common libgnome-keyring0
  libgnome-menu-3-0 libgnomekbd-common libgnomekbd8 libgnutls-dev libgnutls28-dev libgnutlsxx28 libgoa-1.0-0b libgoa-1.0-common libgomp1 libgpg-error-dev libgphoto2-6
  libgphoto2-l10n libgphoto2-port12 libgraphite2-3 libgstreamer-plugins-base1.0-0 libgstreamer-plugins-good1.0-0 libgstreamer1.0-0 libgtk-3-0 libgtk-3-bin libgtk-3-common
  libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libgtop-2.0-10 libgtop2-common libgudev-1.0-0 libgusb2 libgweather-3-6 libgweather-common libharfbuzz-icu0 libharfbuzz0b
  libhtml-parser-perl libhtml-tagset-perl libhttp-date-perl libhttp-message-perl libhunspell-1.3-0 libhwloc-dev libhwloc-plugins libhwloc5 libhyphen0 libibus-1.0-5
  libibverbs-dev libibverbs1 libical1a libice-dev libice6 libicu-dev libidn11-dev libido3-0.1-0 libiec61883-0 libieee1284-3 libimobiledevice6 libindicator3-7 libinput-bin
  libinput10 libio-html-perl libio-pty-perl libio-socket-inet6-perl libio-socket-ssl-perl libio-string-perl libipc-run-perl libipc-system-simple-perl libisl15 libitm1
  libjack-jackd2-0 libjansson4 libjavascriptcoregtk-4.0-18 libjbig0 libjpeg-turbo8 libjpeg8 libjson-glib-1.0-0 libjson-glib-1.0-common libjsoncpp-dev libjsoncpp1
  libjsonrpccpp-client0 libjsonrpccpp-common0 libjsonrpccpp-dev libjsonrpccpp-server0 libjsonrpccpp-stub0 liblcms2-2 libldb1 libleveldb-dev libleveldb1v5
  liblightdm-gobject-1-0 liblist-moreutils-perl libllvm5.0 liblsan0 libltdl-dev libltdl7 liblwp-mediatypes-perl libmailtools-perl libmbim-glib4 libmbim-proxy
  libmicrohttpd-dev libmicrohttpd10 libmirclient9 libmircommon7 libmircore1 libmirprotobuf3 libmm-glib0 libmpc3 libmpx0 libmtdev1 libmtp-common libmtp-runtime libmtp9
  libnautilus-extension1a libndp0 libnet-dns-perl libnet-domain-tld-perl libnet-ip-perl libnet-libidn-perl libnet-smtp-ssl-perl libnet-ssleay-perl libnih-dbus1
  libnl-3-200 libnl-genl-3-200 libnm-glib4 libnm-gtk-common libnm-gtk0 libnm-util2 libnm0 libnma-common libnma0 libnotify4 libnspr4 libnss-mdns libnss3 libnss3-nssdb
  libnuma-dev liboauth0 libogg0 libopenmpi-dev libopenmpi1.10 libopus0 liborc-0.4-0 libp11-kit-dev libp11-kit-gnome-keyring libpackagekit-glib2-16 libpam-gnome-keyring
  libpanel-applet0 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpangoxft-1.0-0 libparse-debianchangelog-perl libpciaccess0 libpcre16-3 libpcsclite1
  libperlio-gzip-perl libpixman-1-0 libplist3 libprotobuf-lite9v5 libproxy1v5 libpthread-stubs0-dev libpulse-mainloop-glib0 libpulse0 libpulsedsp libpwquality-common
  libpwquality1 libpython-dev libpython-stdlib libpython2.7 libpython2.7-dev libpython2.7-minimal libpython2.7-stdlib libqmi-glib5 libqmi-proxy libqt5core5a libqt5dbus5
  libqt5gui5 libqt5network5 libqt5opengl5 libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5sql5 libqt5sql5-sqlite libqt5svg5 libqt5webkit5 libqt5widgets5 libqt5xml5
  libquadmath0 libraw1394-11 libreadline-dev libreadline6-dev librest-0.7-0 librsvg2-2 librsvg2-common libsamplerate0 libsane libsane-common libsecret-1-0
  libsecret-common libsensors4 libshout3 libsignon-extension1 libsignon-glib1 libsignon-plugins-common1 libsignon-qt5-1 libsm-dev libsm6 libsmbclient libsnappy1v5
  libsndfile1 libsocket6-perl libsoup-gnome2.4-1 libsoup2.4-1 libspeex1 libspeexdsp1 libstdc++-5-dev libsub-name-perl libtag1v5 libtag1v5-vanilla libtalloc2
  libtasn1-6-dev libtasn1-doc libtdb1 libtevent0 libtext-levenshtein-perl libthai-data libthai0 libtheora0 libtiff5 libtimedate-perl libtimezonemap-data libtimezonemap1
  libtinfo-dev libtool libtsan0 libtxc-dxtn-s2tc0 libubsan0 libudisks2-0 libunistring0 libunity-control-center1 libunity-settings-daemon1 libupower-glib3 liburi-perl
  liburl-dispatcher1 libusbmuxd4 libv4l-0 libv4lconvert0 libvdpau1 libvisual-0.4-0 libvorbis0a libvorbisenc2 libvorbisfile3 libvpx3 libwacom-bin libwacom-common libwacom2
  libwavpack1 libwayland-client0 libwayland-cursor0 libwayland-egl1-mesa libwayland-server0 libwbclient0 libwebkit2gtk-4.0-37 libwebkit2gtk-4.0-37-gtk2 libwebp5
  libwebrtc-audio-processing-0 libx11-dev libx11-doc libx11-xcb-dev libx11-xcb1 libxau-dev libxaw7 libxcb-dri2-0 libxcb-dri2-0-dev libxcb-dri3-0 libxcb-dri3-dev
  libxcb-glx0 libxcb-glx0-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-present-dev libxcb-present0 libxcb-randr0 libxcb-randr0-dev libxcb-render-util0
  libxcb-render0 libxcb-render0-dev libxcb-shape0 libxcb-shape0-dev libxcb-shm0 libxcb-sync-dev libxcb-sync1 libxcb-util1 libxcb-xfixes0 libxcb-xfixes0-dev libxcb-xkb1
  libxcb1-dev libxcomposite1 libxcursor1 libxdamage-dev libxdamage1 libxdmcp-dev libxext-dev libxfixes-dev libxfixes3 libxfont1 libxft2 libxi-dev libxi6 libxinerama1
  libxkbcommon-x11-0 libxkbcommon0 libxkbfile1 libxklavier16 libxmu-dev libxmu-headers libxmu6 libxnvctrl0 libxpm4 libxrandr2 libxrender1 libxshmfence-dev libxshmfence1
  libxslt1.1 libxt-dev libxt6 libxtst6 libxv1 libxxf86dga1 libxxf86vm-dev libxxf86vm1 libyaml-libyaml-perl libyelp0 lightdm lintian linux-libc-dev make manpages-dev
  mesa-common-dev mesa-vdpau-drivers mobile-broadband-provider-info modemmanager mountall mousetweaks mpi-default-bin mpi-default-dev nautilus-data nettle-dev
  network-manager network-manager-gnome network-manager-pptp notification-daemon nvidia-390 nvidia-390-dev nvidia-modprobe nvidia-opencl-icd-390 nvidia-prime
  nvidia-settings ocl-icd-libopencl1 opencl-headers openjdk-8-jre openjdk-8-jre-headless openmpi-bin openmpi-common p11-kit p11-kit-modules patchutils pinentry-gnome3
  pkg-config policykit-1-gnome ppp pptp-linux pulseaudio pulseaudio-module-x11 pulseaudio-utils python python-dev python-minimal python-talloc python2.7 python2.7-dev
  python2.7-minimal python3-aptdaemon python3-aptdaemon.pkcompat python3-bs4 python3-cairo python3-cups python3-cupshelpers python3-defer python3-html5lib python3-lxml
  python3-xdg python3-xkit qttranslations5-l10n rtkit samba-libs screen-resolution-extra session-migration signon-keyring-extension signon-plugin-oauth2
  signon-plugin-password signon-ui signon-ui-service signon-ui-x11 signond sound-theme-freedesktop system-config-printer-common system-config-printer-gnome
  system-config-printer-udev t1utils ubuntu-mono ubuntu-system-service ubuntu-touch-sounds udisks2 unity-control-center unity-control-center-faces
  unity-control-center-signon unity-greeter unity-settings-daemon upower upstart usb-modeswitch usb-modeswitch-data usbmuxd vdpau-driver-all wamerican wireless-regdb
  wpasupplicant x11-common x11-utils x11-xkb-utils x11proto-core-dev x11proto-damage-dev x11proto-dri2-dev x11proto-fixes-dev x11proto-gl-dev x11proto-input-dev
  x11proto-kb-dev x11proto-xext-dev x11proto-xf86vidmode-dev xfonts-base xfonts-encodings xfonts-utils xorg-sgml-doctools xserver-common xserver-xorg xserver-xorg-core
  xserver-xorg-input-all xserver-xorg-input-evdev xserver-xorg-input-synaptics xserver-xorg-input-vmmouse xserver-xorg-input-wacom xserver-xorg-legacy xtrans-dev yelp
  yelp-xsl zlib1g-dev
The following packages will be upgraded:
  curl gcc-5-base libc6 libcurl3-gnutls libdrm2 libnuma1 libstdc++6 libtasn1-6
8 upgraded, 852 newly installed, 0 to remove and 92 not upgraded.
Need to get 1,502 MB of archives.
After this operation, 4,194 MB of additional disk space will be used.
Get:1 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 cmake-data all 3.5.1-1ubuntu3 [1,121 kB]
Get:2 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libc6 amd64 2.23-0ubuntu10 [2,580 kB]
Get:3 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libarchive13 amd64 3.1.2-11ubuntu0.16.04.3 [262 kB]
Get:4 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcurl3 amd64 7.47.0-1ubuntu2.6 [187 kB]
...
...
Setting up nvidia-390 (390.30-0ubuntu1) ...
update-alternatives: using /usr/lib/nvidia-390/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in auto mode
update-alternatives: warning: skip creation of /usr/share/grub-gfxpayload-lists/blacklist/10_proprietary-graphics-drivers because associated file /usr/share/nvidia-390/nvidia-390.grub-gfxpayload (of link group x86_64-linux-gnu_gl_conf) doesn't exist
update-alternatives: using /usr/lib/nvidia-390/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf (x86_64-linux-gnu_egl_conf) in auto mode
update-alternatives: using /usr/lib/nvidia-390/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in auto mode
update-alternatives: using /usr/lib/nvidia-390/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_EGL.conf (i386-linux-gnu_egl_conf) in auto mode
update-alternatives: using /usr/share/nvidia-390/glamor.conf to provide /usr/share/X11/xorg.conf.d/glamoregl.conf (glamor_conf) in auto mode
update-initramfs: deferring update (trigger activated)

A modprobe blacklist file has been created at /etc/modprobe.d to prevent Nouveau from loading. This can be reverted by deleting /etc/modprobe.d/nvidia-graphics-drivers.conf.
A new initrd image has also been created. To revert, please replace /boot/initrd-4.4.0-1041-aws with /boot/initrd-$(uname -r)-backup.

*****************************************************************************
*** Reboot your computer and verify that the NVIDIA graphics driver can   ***
*** be loaded.                                                            ***
*****************************************************************************

Adding system user `nvidia-persistenced' (UID 115) ...
Adding new group `nvidia-persistenced' (GID 122) ...
Adding new user `nvidia-persistenced' (UID 115) with group `nvidia-persistenced' ...
Not creating home directory `/'.
Loading new nvidia-390-390.30 DKMS files...
First Installation: checking all kernels...
Building only for 4.4.0-1041-aws
Building for architecture x86_64
Building initial module for 4.4.0-1041-aws
Done.

nvidia_390:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.4.0-1041-aws/updates/dkms/

nvidia_390_modeset.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.4.0-1041-aws/updates/dkms/

nvidia_390_drm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.4.0-1041-aws/updates/dkms/

nvidia_390_uvm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.4.0-1041-aws/updates/dkms/

depmod....

DKMS: install completed.
Setting up nvidia-390-dev (390.30-0ubuntu1) ...
Setting up libcuda1-390 (390.30-0ubuntu1) ...
Setting up nvidia-modprobe (390.30-0ubuntu1) ...
....
....

done.
done.
root@ip-172-31-3-105:~# reboot
root@ip-172-31-3-105:~/ethminer/build# make -j 4
Scanning dependencies of target ethash
[  5%] Building C object libethash/CMakeFiles/ethash.dir/sha3.c.o
[  5%] Building C object libethash/CMakeFiles/ethash.dir/internal.c.o
[  5%] Built target BuildInfo.h
Scanning dependencies of target devcore
[  8%] Building CXX object libdevcore/CMakeFiles/devcore.dir/RLP.cpp.o
[ 10%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Worker.cpp.o
[ 13%] Building CXX object libdevcore/CMakeFiles/devcore.dir/FixedHash.cpp.o
[ 16%] Linking C static library libethash.a
[ 16%] Built target ethash
[ 18%] Building CXX object libdevcore/CMakeFiles/devcore.dir/SHA3.cpp.o
[ 21%] Building CXX object libdevcore/CMakeFiles/devcore.dir/CommonData.cpp.o
[ 24%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Log.cpp.o
[ 27%] Linking CXX static library libdevcore.a
[ 27%] Built target devcore
Scanning dependencies of target hwmon
[ 32%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wraphelper.cpp.o
[ 32%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wrapnvml.cpp.o
Scanning dependencies of target apicore
[ 35%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wrapadl.cpp.o
Scanning dependencies of target poolprotocols
[ 37%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wrapamdsysfs.cpp.o
[ 40%] Building CXX object libapicore/CMakeFiles/apicore.dir/Api.cpp.o
[ 43%] Building CXX object libapicore/CMakeFiles/apicore.dir/ApiServer.cpp.o
[ 45%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/PoolClient.cpp.o
[ 48%] Linking CXX static library libhwmon.a
[ 48%] Built target hwmon
[ 51%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/PoolManager.cpp.o
[ 54%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/testing/SimulateClient.cpp.o
[ 56%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/stratum/EthStratumClient.cpp.o
[ 59%] Linking CXX static library libapicore.a
[ 59%] Built target apicore
[ 62%] Building NVCC (Device) object libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o
/root/ethminer/libpoolprotocols/testing/SimulateClient.cpp:41:52: warning: unused parameter ‘rate’ [-Wunused-parameter]
 void SimulateClient::submitHashrate(string const & rate)
                                                    ^
[ 64%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/getwork/EthGetworkClient.cpp.o
ptxas info    : 0 bytes gmem, 264 bytes cmem[3]
ptxas info    : Compiling entry function '_Z25ethash_calculate_dag_itemj' for 'sm_30'
ptxas info    : Function properties for _Z25ethash_calculate_dag_itemj
    656 bytes stack frame, 1136 bytes spill stores, 844 bytes spill loads
ptxas info    : Used 63 registers, 324 bytes cmem[0]
ptxas info    : Compiling entry function '_Z13ethash_searchILj8EEvPV14search_resultsm' for 'sm_30'
ptxas info    : Function properties for _Z13ethash_searchILj8EEvPV14search_resultsm
    160 bytes stack frame, 408 bytes spill stores, 420 bytes spill loads
ptxas info    : Used 63 registers, 336 bytes cmem[0], 96 bytes cmem[2]
ptxas info    : Compiling entry function '_Z13ethash_searchILj4EEvPV14search_resultsm' for 'sm_30'
ptxas info    : Function properties for _Z13ethash_searchILj4EEvPV14search_resultsm
    104 bytes stack frame, 288 bytes spill stores, 276 bytes spill loads
ptxas info    : Used 63 registers, 336 bytes cmem[0]
ptxas info    : Compiling entry function '_Z13ethash_searchILj2EEvPV14search_resultsm' for 'sm_30'
ptxas info    : Function properties for _Z13ethash_searchILj2EEvPV14search_resultsm
    72 bytes stack frame, 236 bytes spill stores, 212 bytes spill loads
ptxas info    : Used 63 registers, 336 bytes cmem[0]
ptxas info    : Compiling entry function '_Z13ethash_searchILj1EEvPV14search_resultsm' for 'sm_30'
ptxas info    : Function properties for _Z13ethash_searchILj1EEvPV14search_resultsm
    72 bytes stack frame, 224 bytes spill stores, 204 bytes spill loads
ptxas info    : Used 63 registers, 336 bytes cmem[0]
ptxas info    : 0 bytes gmem, 264 bytes cmem[3]
ptxas info    : Compiling entry function '_Z25ethash_calculate_dag_itemj' for 'sm_35'
ptxas info    : Function properties for _Z25ethash_calculate_dag_itemj
    272 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 79 registers, 324 bytes cmem[0]
ptxas info    : Compiling entry function '_Z13ethash_searchILj8EEvPV14search_resultsm' for 'sm_35'
ptxas info    : Function properties for _Z13ethash_searchILj8EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 101 registers, 336 bytes cmem[0], 96 bytes cmem[2]
ptxas info    : Compiling entry function '_Z13ethash_searchILj4EEvPV14search_resultsm' for 'sm_35'
ptxas info    : Function properties for _Z13ethash_searchILj4EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 80 registers, 336 bytes cmem[0]
ptxas info    : Compiling entry function '_Z13ethash_searchILj2EEvPV14search_resultsm' for 'sm_35'
ptxas info    : Function properties for _Z13ethash_searchILj2EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 79 registers, 336 bytes cmem[0]
ptxas info    : Compiling entry function '_Z13ethash_searchILj1EEvPV14search_resultsm' for 'sm_35'
ptxas info    : Function properties for _Z13ethash_searchILj1EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 79 registers, 336 bytes cmem[0]
[ 67%] Linking CXX static library libpoolprotocols.a
[ 67%] Built target poolprotocols
ptxas info    : 0 bytes gmem, 264 bytes cmem[3]
ptxas info    : Compiling entry function '_Z25ethash_calculate_dag_itemj' for 'sm_50'
ptxas info    : Function properties for _Z25ethash_calculate_dag_itemj
    272 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 96 registers, 324 bytes cmem[0], 4 bytes cmem[2]
ptxas info    : Compiling entry function '_Z13ethash_searchILj8EEvPV14search_resultsm' for 'sm_50'
ptxas info    : Function properties for _Z13ethash_searchILj8EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 107 registers, 336 bytes cmem[0], 96 bytes cmem[2]
ptxas info    : Compiling entry function '_Z13ethash_searchILj4EEvPV14search_resultsm' for 'sm_50'
ptxas info    : Function properties for _Z13ethash_searchILj4EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 80 registers, 336 bytes cmem[0]
ptxas info    : Compiling entry function '_Z13ethash_searchILj2EEvPV14search_resultsm' for 'sm_50'
ptxas info    : Function properties for _Z13ethash_searchILj2EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 80 registers, 336 bytes cmem[0]
ptxas info    : Compiling entry function '_Z13ethash_searchILj1EEvPV14search_resultsm' for 'sm_50'
ptxas info    : Function properties for _Z13ethash_searchILj1EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 80 registers, 336 bytes cmem[0]
ptxas info    : 0 bytes gmem, 264 bytes cmem[3]
ptxas info    : Compiling entry function '_Z25ethash_calculate_dag_itemj' for 'sm_52'
ptxas info    : Function properties for _Z25ethash_calculate_dag_itemj
    272 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 96 registers, 324 bytes cmem[0], 4 bytes cmem[2]
ptxas info    : Compiling entry function '_Z13ethash_searchILj8EEvPV14search_resultsm' for 'sm_52'
ptxas info    : Function properties for _Z13ethash_searchILj8EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 107 registers, 336 bytes cmem[0], 96 bytes cmem[2]
ptxas info    : Compiling entry function '_Z13ethash_searchILj4EEvPV14search_resultsm' for 'sm_52'
ptxas info    : Function properties for _Z13ethash_searchILj4EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 80 registers, 336 bytes cmem[0]
ptxas info    : Compiling entry function '_Z13ethash_searchILj2EEvPV14search_resultsm' for 'sm_52'
ptxas info    : Function properties for _Z13ethash_searchILj2EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 80 registers, 336 bytes cmem[0]
ptxas info    : Compiling entry function '_Z13ethash_searchILj1EEvPV14search_resultsm' for 'sm_52'
ptxas info    : Function properties for _Z13ethash_searchILj1EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 80 registers, 336 bytes cmem[0]
ptxas info    : 0 bytes gmem, 264 bytes cmem[3]
ptxas info    : Compiling entry function '_Z25ethash_calculate_dag_itemj' for 'sm_53'
ptxas info    : Function properties for _Z25ethash_calculate_dag_itemj
    272 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 96 registers, 324 bytes cmem[0], 4 bytes cmem[2]
ptxas info    : Compiling entry function '_Z13ethash_searchILj8EEvPV14search_resultsm' for 'sm_53'
ptxas info    : Function properties for _Z13ethash_searchILj8EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 107 registers, 336 bytes cmem[0], 96 bytes cmem[2]
ptxas info    : Compiling entry function '_Z13ethash_searchILj4EEvPV14search_resultsm' for 'sm_53'
ptxas info    : Function properties for _Z13ethash_searchILj4EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 80 registers, 336 bytes cmem[0]
ptxas info    : Compiling entry function '_Z13ethash_searchILj2EEvPV14search_resultsm' for 'sm_53'
ptxas info    : Function properties for _Z13ethash_searchILj2EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 80 registers, 336 bytes cmem[0]
ptxas info    : Compiling entry function '_Z13ethash_searchILj1EEvPV14search_resultsm' for 'sm_53'
ptxas info    : Function properties for _Z13ethash_searchILj1EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 80 registers, 336 bytes cmem[0]
ptxas info    : 0 bytes gmem, 264 bytes cmem[3]
ptxas info    : Compiling entry function '_Z25ethash_calculate_dag_itemj' for 'sm_60'
ptxas info    : Function properties for _Z25ethash_calculate_dag_itemj
    272 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 96 registers, 324 bytes cmem[0], 4 bytes cmem[2]
ptxas info    : Compiling entry function '_Z13ethash_searchILj8EEvPV14search_resultsm' for 'sm_60'
ptxas info    : Function properties for _Z13ethash_searchILj8EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 107 registers, 336 bytes cmem[0], 96 bytes cmem[2]
ptxas info    : Compiling entry function '_Z13ethash_searchILj4EEvPV14search_resultsm' for 'sm_60'
ptxas info    : Function properties for _Z13ethash_searchILj4EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 80 registers, 336 bytes cmem[0]
ptxas info    : Compiling entry function '_Z13ethash_searchILj2EEvPV14search_resultsm' for 'sm_60'
ptxas info    : Function properties for _Z13ethash_searchILj2EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 80 registers, 336 bytes cmem[0]
ptxas info    : Compiling entry function '_Z13ethash_searchILj1EEvPV14search_resultsm' for 'sm_60'
ptxas info    : Function properties for _Z13ethash_searchILj1EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 80 registers, 336 bytes cmem[0]
ptxas info    : 0 bytes gmem, 264 bytes cmem[3]
ptxas info    : Compiling entry function '_Z25ethash_calculate_dag_itemj' for 'sm_61'
ptxas info    : Function properties for _Z25ethash_calculate_dag_itemj
    272 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 96 registers, 324 bytes cmem[0], 4 bytes cmem[2]
ptxas info    : Compiling entry function '_Z13ethash_searchILj8EEvPV14search_resultsm' for 'sm_61'
ptxas info    : Function properties for _Z13ethash_searchILj8EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 107 registers, 336 bytes cmem[0], 96 bytes cmem[2]
ptxas info    : Compiling entry function '_Z13ethash_searchILj4EEvPV14search_resultsm' for 'sm_61'
ptxas info    : Function properties for _Z13ethash_searchILj4EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 80 registers, 336 bytes cmem[0]
ptxas info    : Compiling entry function '_Z13ethash_searchILj2EEvPV14search_resultsm' for 'sm_61'
ptxas info    : Function properties for _Z13ethash_searchILj2EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 80 registers, 336 bytes cmem[0]
ptxas info    : Compiling entry function '_Z13ethash_searchILj1EEvPV14search_resultsm' for 'sm_61'
ptxas info    : Function properties for _Z13ethash_searchILj1EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 80 registers, 336 bytes cmem[0]
ptxas info    : 0 bytes gmem, 264 bytes cmem[3]
ptxas info    : Compiling entry function '_Z25ethash_calculate_dag_itemj' for 'sm_62'
ptxas info    : Function properties for _Z25ethash_calculate_dag_itemj
    272 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 96 registers, 324 bytes cmem[0], 4 bytes cmem[2]
ptxas info    : Compiling entry function '_Z13ethash_searchILj8EEvPV14search_resultsm' for 'sm_62'
ptxas info    : Function properties for _Z13ethash_searchILj8EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 107 registers, 336 bytes cmem[0], 96 bytes cmem[2]
ptxas info    : Compiling entry function '_Z13ethash_searchILj4EEvPV14search_resultsm' for 'sm_62'
ptxas info    : Function properties for _Z13ethash_searchILj4EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 80 registers, 336 bytes cmem[0]
ptxas info    : Compiling entry function '_Z13ethash_searchILj2EEvPV14search_resultsm' for 'sm_62'
ptxas info    : Function properties for _Z13ethash_searchILj2EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 80 registers, 336 bytes cmem[0]
ptxas info    : Compiling entry function '_Z13ethash_searchILj1EEvPV14search_resultsm' for 'sm_62'
ptxas info    : Function properties for _Z13ethash_searchILj1EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 80 registers, 336 bytes cmem[0]
ptxas info    : 0 bytes gmem, 264 bytes cmem[3]
ptxas info    : Compiling entry function '_Z25ethash_calculate_dag_itemj' for 'sm_70'
ptxas info    : Function properties for _Z25ethash_calculate_dag_itemj
    272 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 82 registers, 356 bytes cmem[0]
ptxas info    : Compiling entry function '_Z13ethash_searchILj8EEvPV14search_resultsm' for 'sm_70'
ptxas info    : Function properties for _Z13ethash_searchILj8EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 108 registers, 368 bytes cmem[0], 104 bytes cmem[2]
ptxas info    : Compiling entry function '_Z13ethash_searchILj4EEvPV14search_resultsm' for 'sm_70'
ptxas info    : Function properties for _Z13ethash_searchILj4EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 86 registers, 368 bytes cmem[0]
ptxas info    : Compiling entry function '_Z13ethash_searchILj2EEvPV14search_resultsm' for 'sm_70'
ptxas info    : Function properties for _Z13ethash_searchILj2EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 84 registers, 368 bytes cmem[0]
ptxas info    : Compiling entry function '_Z13ethash_searchILj1EEvPV14search_resultsm' for 'sm_70'
ptxas info    : Function properties for _Z13ethash_searchILj1EEvPV14search_resultsm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 80 registers, 368 bytes cmem[0]
Scanning dependencies of target ethash-cuda
[ 70%] Building CXX object libethash-cuda/CMakeFiles/ethash-cuda.dir/CUDAMiner.cpp.o
[ 72%] Linking CXX static library libethash-cuda.a
[ 72%] Built target ethash-cuda
[ 78%] Generating OpenCL Kernel Byte Array
[ 78%] Generating OpenCL Kernel Byte Array
Scanning dependencies of target ethash-cl
[ 81%] Building CXX object libethash-cl/CMakeFiles/ethash-cl.dir/CLMiner.cpp.o
[ 83%] Linking CXX static library libethash-cl.a
[ 83%] Built target ethash-cl
Scanning dependencies of target ethcore
[ 86%] Building CXX object libethcore/CMakeFiles/ethcore.dir/EthashAux.cpp.o
[ 89%] Building CXX object libethcore/CMakeFiles/ethcore.dir/BlockHeader.cpp.o
[ 91%] Building CXX object libethcore/CMakeFiles/ethcore.dir/Miner.cpp.o
[ 94%] Linking CXX static library libethcore.a
[ 94%] Built target ethcore
Scanning dependencies of target ethminer
[ 97%] Building CXX object ethminer/CMakeFiles/ethminer.dir/main.cpp.o
[100%] Linking CXX executable ethminer
[100%] Built target ethminer
root@ip-172-31-3-105:~/ethminer/build# cd ethminer
./ethminer -U -F http://mypoolethereum.com:80/1111111111111111111111111111111111111

3. Extra section – noting the benchmark.

This installation is done in amazon EC2 p2.xlarge instance type, which has 1 GPU with 12 GiB RAM (2496 parallel processing cores), the processor is 4vcpu of Intel Xeon E5-2686 v4 (Broadwell) processors running at 2.7 GHz, Main Memory 122 GiB. You can see the virtual server is using “NVIDIA Corporation GK210GL [Tesla K80] (rev a1)”. So the benchmark of the virutal server is total of 6.5~6.6 millions hashes per second of Ethash with highest value of 6.65 millions hashes per second.
Here is the output of the lspci:

00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 01)
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
00:03.0 Ethernet controller: Device 1d0f:ec20
00:1e.0 3D controller: NVIDIA Corporation GK210GL [Tesla K80] (rev a1)
00:1f.0 Unassigned class [ff80]: XenSource, Inc. Xen Platform Device (rev 01)

And the output of the nvidia-smi:

root@ip-172-31-3-105:~# nvidia-smi 
Fri Feb 23 11:45:19 2018       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.30                 Driver Version: 390.30                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Tesla K80           Off  | 00000000:00:1E.0 Off |                    0 |
| N/A   71C    P0   125W / 149W |   2501MiB / 11441MiB |    100%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0     11042      C   ./ethminer                                  2490MiB |
+-----------------------------------------------------------------------------+

Install ethminer in a machine with NVIDIA video card under Ubuntu 16.04 LTS

This is simple “how to” to get started mining crypto currency with explanations using Ethash algorithm like Ethererum. Just follow the simple steps and you’ll have an optimized GPU for Ethash crypto currencies:

STEP 1) Download latest CUDA from NVDIA site.

Open your favorite browser and go to

http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/

and search for copy the link

cuda-repo-ubuntu1604-

in our case the latest version of CUDA 9.1.85 is

http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb

There is also

cuda-repo-ubuntu1604_8.0.44-1_amd64.deb 4.0KB 2017-09-22 22:08
cuda-repo-ubuntu1604_8.0.61-1_amd64.deb 4.0KB 2017-09-22 22:08
cuda-repo-ubuntu1604_9.0.176-1_amd64.deb 4.0KB 2017-09-22 22:09
cuda-repo-ubuntu1604_9.1.85-1_amd64.deb 4.0KB 2017-12-02 01:29

you could try them to see if you have a better performance for your video card with some of the older CUDA platform.
So now we download the file with wget just execute

cd ~
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb

STEP 2) Install the NVIDIA CUDA repository in you UBUNTU with

sudo dpkg -i /root/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
* If you encounter error

The public CUDA GPG key does not appear to be installed.
To install the key, run this command:
sudo apt-key adv –fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub

Just execute the command it says and then again, so in our case:

sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
dpkg -i /root/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb

STEP 3) Install repository for your proprietary drivers of NVIDIA video cards

sudo add-apt-repository -y ppa:graphics-drivers/ppa

STEP 4) Update all repositories to download the latest package lists

sudo apt-get update -y

STEP 5) Install the dependencies for the ethminer, NVIDIA video driver and NVIDIA CUDA platform5).

Install the dependencies for the ethminer, NVIDIA video driver and NVIDIA CUDA platform

sudo apt-get -y install git cmake libleveldb-dev libjsoncpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential cuda libcrypto++-dev libjsonrpccpp-dev

You probably will see how you packet manager downloads around 852 packets (arround 1.5G) and installs them all, at last you must see no errors and probably there will be double “done”

done.
done.

STEP 6) now reboot the machine to load the NVIDIA proprietary driver.

At the time of this howto we the NVIDIA driver is 390.30 (nvidia-390 (390.30-0ubuntu1)), but you can list older ones and install them to see if they are better than the last. It happens frequently an older driver (but not much old) to be slightly better in performance than the latest driver, so you can experiment with other older drivers if you like.

sudo reboot

STEP 7) Check to see if your driver is loaded properly

Execute command

dmesg|grep nvidia

Here is example output

[   11.096593] nvidia: module license 'NVIDIA' taints kernel.
[   11.116551] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[   11.134454] nvidia-nvlink: Nvlink Core is being initialized, major device number 248
[   11.226239] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  390.30  Wed Jan 31 22:08:49 PST 2018 (using threaded interrupts)
[   11.265963] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  390.30  Wed Jan 31 21:32:48 PST 2018
[   11.275447] [drm] [nvidia-drm] [GPU ID 0x0000001e] Loading driver
[   14.527352] nvidia-uvm: Loaded the UVM driver in 8 mode, major device number 247

So we finished the first stage, the preparation of your machine to install the ethminer. Now we move to the actual installation of the gpu mining software (and cpu mining, of course):

STEP 8)* Tune screen for better support of your scrolling history, because usually you execute the ethminer in screen (this step is not required for proper working of ethminer)

echo "termcapinfo xterm* ti@:te@" &amp;amp;amp;amp;amp;gt; /root/.screenrc

STEP 9) Start screen and clone the ethminer repository

git clone https://github.com/ethereum-mining/ethminer

STEP 10) Compile ethminer with “native” optimizations for the compiler gnu gcc. It has probably no impact of the GPU computing, but still it is a good practice to build the source with the best suited optimization for you mining machine.

mkdir -p ./ethminer/build
cd ./ethminer/build
export CFLAGS="-O2 -march=native -msse3 -fomit-frame-pointer -pipe"
export CHOST="x86_64-pc-linux-gnu"
export CXXFLAGS="${CFLAGS}"
export LDFLAGS="-Wl,-O1"
cmake .. -DETHASHCUDA=ON -DETHASHCL=ON
make -j 4

STEP 11) Execute ethminer, but before you must execute some tuning exports for the GPU

export GPU_FORCE_64BIT_PTR=0
export GPU_MAX_HEAP_SIZE=100
export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
export GPU_SINGLE_ALLOC_PERCENT=100
cd ~/ethminer/build/ethminer
./ethminer -U -F http://yourpooladdress:80/11111111111111111111111111111111111/miner-01

In the example above we use a pool: yourpooladdress and the ethereum address 11111111111111111111111111111111111 – the two values are not valid, SET YOUR VALUES, do not use this fake values!

*Running the miner is simple just execute

ethminer

  • -U – When mining use the GPU via CUDA.
  • -G – When mining use the GPU via OpenCL.
  • -X,–cuda-opencl Use OpenCL + CUDA in a system with mixed AMD/Nvidia cards. May require setting –opencl-platform 1

*Here is the output of the properly built and running ethminer:

m 10:54:42|ethminer| ethminer version 0.14.0.dev2
m 10:54:42|ethminer| Build: Linux/g++ / Release
cu 10:54:45|ethminer| Using grid size 8192 , block size 128
m 10:54:45|ethminer| not-connected
ℹ 10:54:45|getwork | Connected to http://eth-eu.dwarfpool.com:80/11111111111111111111111111111111111/miner-02
ℹ 10:54:45|getwork | Spinning up miners...
ℹ 10:54:45|cuda-0 | No work. Pause for 3 s.
ℹ 10:54:45|getwork | Received new job #f0a5f915 from http://eth-eu.dwarfpool.com:80/11111111111111111111111111111111111/miner-02
ℹ 10:54:48|cuda-0 | Initialising miner 0
m 10:54:50|ethminer| Speed 0.00 Mh/s gpu/0 0.00 [A0+0:R0+0:F0] Time: 00:00
cu 10:54:50|cuda-0 | Using device: Tesla K80 (Compute 3.7)
cu 10:54:50|cuda-0 | Set Device to current
cu 10:54:50|cuda-0 | Resetting device
cu 10:54:50|cuda-0 | Allocating light with size: 39190336
cu 10:54:50|cuda-0 | Generating mining buffers
cu 10:54:50|cuda-0 | Generating DAG for GPU # 0 with dagSize: 2508191872 gridSize: 8192
m 10:54:55|ethminer| Speed 0.00 Mh/s gpu/0 0.00 [A0+0:R0+0:F0] Time: 00:00
ℹ 10:54:56|getwork | Received new job #5a34e38b from http://eth-eu.dwarfpool.com:80/11111111111111111111111111111111111/miner-02
m 10:55:00|ethminer| Speed 0.00 Mh/s gpu/0 0.00 [A0+0:R0+0:F0] Time: 00:00
ℹ 10:55:01|getwork | Received new job #d48be1aa from http://eth-eu.dwarfpool.com:80/11111111111111111111111111111111111/miner-02
m 10:55:05|ethminer| Speed 0.00 Mh/s gpu/0 0.00 [A0+0:R0+0:F0] Time: 00:00
m 10:55:10|ethminer| Speed 0.00 Mh/s gpu/0 0.00 [A0+0:R0+0:F0] Time: 00:00
m 10:55:15|ethminer| Speed 0.00 Mh/s gpu/0 0.00 [A0+0:R0+0:F0] Time: 00:00
ℹ 10:55:19|getwork | Received new job #7f50d832 from http://eth-eu.dwarfpool.com:80/11111111111111111111111111111111111/miner-02
m 10:55:20|ethminer| Speed 5.56 Mh/s gpu/0 5.56 [A0+0:R0+0:F0] Time: 00:00
ℹ 10:55:21|getwork | Received new job #b41b6784 from http://eth-eu.dwarfpool.com:80/11111111111111111111111111111111111/miner-02
ℹ 10:55:23|getwork | Received new job #b9a76ceb from http://eth-eu.dwarfpool.com:80/11111111111111111111111111111111111/miner-02
m 10:55:25|ethminer| Speed 5.86 Mh/s gpu/0 5.86 [A0+0:R0+0:F0] Time: 00:00
m 10:55:30|ethminer| Speed 6.30 Mh/s gpu/0 6.30 [A0+0:R0+0:F0] Time: 00:00
m 10:55:35|ethminer| Speed 6.57 Mh/s gpu/0 6.57 [A0+0:R0+0:F0] Time: 00:00
ℹ 10:55:38|getwork | Received new job #e0329f03 from http://eth-eu.dwarfpool.com:80/11111111111111111111111111111111111/miner-02
m 10:55:40|ethminer| Speed 6.60 Mh/s gpu/0 6.60 [A0+0:R0+0:F0] Time: 00:00
m 10:55:45|ethminer| Speed 6.50 Mh/s gpu/0 6.50 [A0+0:R0+0:F0] Time: 00:01
m 10:55:50|ethminer| Speed 6.58 Mh/s gpu/0 6.58 [A0+0:R0+0:F0] Time: 00:01
m 10:55:55|ethminer| Speed 6.58 Mh/s gpu/0 6.58 [A0+0:R0+0:F0] Time: 00:01
m 10:56:00|ethminer| Speed 6.68 Mh/s gpu/0 6.68 [A0+0:R0+0:F0] Time: 00:01
m 10:56:05|ethminer| Speed 6.58 Mh/s gpu/0 6.58 [A0+0:R0+0:F0] Time: 00:01
m 10:56:10|ethminer| Speed 6.58 Mh/s gpu/0 6.58 [A0+0:R0+0:F0] Time: 00:01
m 10:56:15|ethminer| Speed 6.68 Mh/s gpu/0 6.68 [A0+0:R0+0:F0] Time: 00:01
m 10:56:20|ethminer| Speed 6.58 Mh/s gpu/0 6.58 [A0+0:R0+0:F0] Time: 00:01
m 10:56:25|ethminer| Speed 6.68 Mh/s gpu/0 6.68 [A0+0:R0+0:F0] Time: 00:01
ℹ 10:56:25|getwork | Received new job #22e64b5b from http://eth-eu.dwarfpool.com:80/11111111111111111111111111111111111/miner-02
m 10:56:30|ethminer| Speed 6.50 Mh/s gpu/0 6.50 [A0+0:R0+0:F0] Time: 00:01
m 10:56:35|ethminer| Speed 6.50 Mh/s gpu/0 6.50 [A0+0:R0+0:F0] Time: 00:01
m 10:56:40|ethminer| Speed 6.58 Mh/s gpu/0 6.58 [A0+0:R0+0:F0] Time: 00:01
ℹ 10:56:41|cuda-0 | Nonce 0x656b10dfbe95134f submitted to http://eth-eu.dwarfpool.com:80/11111111111111111111111111111111111/miner-02
ℹ 10:56:42|getwork | **Accepted in 500 ms.
m 10:56:45|ethminer| Speed 6.68 Mh/s gpu/0 6.68 [A1+0:R0+0:F0] Time: 00:02
ℹ 10:56:47|getwork | Received new job #304cc9df from http://eth-eu.dwarfpool.com:80/11111111111111111111111111111111111/miner-02
m 10:56:50|ethminer| Speed 6.50 Mh/s gpu/0 6.50 [A1+0:R0+0:F0] Time: 00:02
m 10:56:55|ethminer| Speed 6.51 Mh/s gpu/0 6.51 [A1+0:R0+0:F0] Time: 00:02

* Here is the all options of the ethminer:

./ethminer --help
Usage ethminer [OPTIONS]
Options:

Work farming mode:
    -F,--farm <url>  Put into mining farm mode with the work server at URL (default: http://127.0.0.1:8545)
    -FF,-FO, --farm-failover, --stratum-failover <url> Failover getwork/stratum URL (default: disabled)
        --farm-retries <n> Number of retries until switch to failover (default: 3)
        -S, --stratum <host:port>  Put into stratum mode with the stratum server at host:port
        -SF, --stratum-failover <host:port>  Failover stratum server at host:port
    -O, --userpass <username.workername:password> Stratum login credentials
    -FO, --failover-userpass <username.workername:password> Failover stratum login credentials (optional, will use normal credentials when omitted)
    --work-timeout <n> reconnect/failover after n seconds of working on the same (stratum) job. Defaults to 180. Don't set lower than max. avg. block time
    -SC, --stratum-client <n>  Stratum client version. Version 1 support only.
    -SP, --stratum-protocol <n> Choose which stratum protocol to use:
        0: official stratum spec: ethpool, ethermine, coinotron, mph, nanopool (default)
        1: eth-proxy compatible: dwarfpool, f2pool, nanopool (required for hashrate reporting to work with nanopool)
        2: EthereumStratum/1.0.0: nicehash
    -RH, --report-hashrate Report current hashrate to pool (please only enable on pools supporting this)
    -HWMON [n] Displays gpu temp, fan percent and power usage. Note: In linux, the program uses sysfs, which may require running with root priviledges.
        0: Displays only temp and fan percent (default)
        1: Also displays power usage
    --exit Stops the miner whenever an error is encountered
    -SE, --stratum-email <s> Email address used in eth-proxy (optional)
    --farm-recheck <n>  Leave n ms between checks for changed work (default: 500). When using stratum, use a high value (i.e. 2000) to get more stable hashrate output

Benchmarking mode:
    -M [<n>],--benchmark [<n>] Benchmark for mining and exit; Optionally specify block number to benchmark against specific DAG.
    --benchmark-warmup <seconds>  Set the duration of warmup for the benchmark tests (default: 3).
    --benchmark-trial <seconds>  Set the duration for each trial for the benchmark tests (default: 3).
    --benchmark-trials <n>  Set the number of benchmark trials to run (default: 5).
Simulation mode:
    -Z [<n>],--simulation [<n>] Mining test mode. Used to validate kernel optimizations. Optionally specify block number.
Mining configuration:
    -G,--opencl  When mining use the GPU via OpenCL.
    -U,--cuda  When mining use the GPU via CUDA.
    -X,--cuda-opencl Use OpenCL + CUDA in a system with mixed AMD/Nvidia cards. May require setting --opencl-platform 1
    --opencl-platform <n>  When mining using -G/--opencl use OpenCL platform n (default: 0).
    --opencl-device <n>  When mining using -G/--opencl use OpenCL device n (default: 0).
    --opencl-devices <0 1 ..n> Select which OpenCL devices to mine on. Default is to use all
    -t, --mining-threads <n> Limit number of CPU/GPU miners to n (default: use everything available on selected platform)
    --list-devices List the detected OpenCL/CUDA devices and exit. Should be combined with -G or -U flag
    --display-interval <n> Set mining stats display interval in seconds. (default: every 5 seconds)
    -L, --dag-load-mode <mode> DAG generation mode.
        parallel    - load DAG on all GPUs at the same time (default)
        sequential  - load DAG on GPUs one after another. Use this when the miner crashes during DAG generation
        single <n>  - generate DAG on device n, then copy to other devices
 OpenCL configuration:
    --cl-kernel <n>  Use a different OpenCL kernel (default: use stable kernel)
        0: stable kernel
        1: experimental kernel
    --cl-local-work Set the OpenCL local work size. Default is 128
    --cl-global-work Set the OpenCL global work size as a multiple of the local work size. Default is 8192 * 128
    --cl-parallel-hash <1 2 ..8> Define how many threads to associate per hash. Default=8
 CUDA configuration:
    --cuda-block-size Set the CUDA block work size. Default is 128
    --cuda-grid-size Set the CUDA grid size. Default is 8192
    --cuda-streams Set the number of CUDA streams. Default is 2
    --cuda-schedule <mode> Set the schedule mode for CUDA threads waiting for CUDA devices to finish work. Default is 'sync'. Possible values are:
        auto  - Uses a heuristic based on the number of active CUDA contexts in the process C and the number of logical processors in the system P. If C > P, then yield else spin.
        spin  - Instruct CUDA to actively spin when waiting for results from the device.
        yield - Instruct CUDA to yield its thread when waiting for results from the device.
        sync  - Instruct CUDA to block the CPU thread on a synchronization primitive when waiting for the results from the device.
    --cuda-devices <0 1 ..n> Select which CUDA GPUs to mine on. Default is to use all
    --cuda-parallel-hash <1 2 ..8> Define how many hashes to calculate in a kernel, can be scaled to achieve better performance. Default=4
    --cuda-noeval  bypass host software re-evalution of GPU solutions.
        This will trim some milliseconds off the time it takes to send a result to the pool.
        Use at your own risk! If GPU generates errored results they WILL be forwarded to the pool
        Not recommended at high overclock.
 API core configuration:
    --api-port Set the api port, the miner should listen to. Use 0 to disable. Default=0, use negative numbers to run in readonly mode. for example -3333.
 General Options:
    -v,--verbosity <0 - 9>  Set the log verbosity from 0 to 9 (default: 5). Set to 9 for switch time logging.
    -V,--version  Show the version and exit.
    -h,--help  Show this help message and exit.
 Envionment variables:
     NO_COLOR - set to any value to disable color output. Unset to re-enable color output.

Access Violation error, when compiling packages in Gentoo

Sometimes if you try to emerge a package in Gentoo you could receive error in the configure phase of the compilation process. The example below is with the emerging the PHP – dev-lang/php-5.6.33:5.6::gentoo, but could happen with many other packages, which are rather old and probably not maintained or the sandbox or even the portage packages are old.
So here is the error and the compilation stops:

srv ~ # emerge -av --nodeps "<php-7"
...
checking for mmap() using MAP_ANON shared memory support... yes
checking for mmap() using /dev/zero shared memory support... yes
checking for mmap() using shm_open() shared memory support...  * ACCESS DENIED:  open_wr:      /run/test.shm.8811LBKone
no
checking for mmap() using regular file shared memory support... yes
...
checking for mmap() using MAP_ANON shared memory support... yes
checking for mmap() using /dev/zero shared memory support... yes
checking for mmap() using shm_open() shared memory support...  * ACCESS DENIED:  open_wr:      /run/test.shm.180309hAMbj
no
checking for mmap() using regular file shared memory support... yes
....
Thank you for using PHP.
config.status: creating php5.spec
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating ext/phar/phar.1
config.status: creating ext/phar/phar.phar.1
config.status: creating main/php_config.h
config.status: executing libtool commands
config.status: executing default commands
>>> Source configured.
 * --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
 * LOG FILE: "/var/log/sandbox/sandbox-13466.log"
 * 
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: open_wr
S: deny
P: /run/test.shm.21532Xx6ViE
A: /run/test.shm.21532Xx6ViE
R: /run/test.shm.21532Xx6ViE
C: ./conftest 

F: open_wr
S: deny
P: /run/test.shm.31817hurGxH
A: /run/test.shm.31817hurGxH
R: /run/test.shm.31817hurGxH
C: ./conftest 

F: open_wr
S: deny
P: /run/test.shm.8811LBKone
A: /run/test.shm.8811LBKone
R: /run/test.shm.8811LBKone
C: ./conftest 

F: open_wr
S: deny
P: /run/test.shm.180309hAMbj
A: /run/test.shm.180309hAMbj
R: /run/test.shm.180309hAMbj
C: ./conftest 
 * --------------------------------------------------------------------------------

>>> Failed to emerge dev-lang/php-5.6.33, Log file:

>>>  '/var/tmp/portage/dev-lang/php-5.6.33/temp/build.log'

You could try adding “-sandbox” to feature in “/etc/portage/make.conf”

FEATURES="-sandbox"

But

the sandbox feature is very important and should not be disabled by default.

And that’s why sometime when you disable it with “-sandbox” you still get access violation and you still cannot install/compile the package!
The thing is you see the error and you can fix it easily. The important part is the directory, which causes the error, in the above example with “dev-lang/php”, but could be any other Gentoo package, the problem is the writing permission for files in “/run” directory. So open the configuration file

/etc/sandbox.d/00default

and you’ll see the there is a variable called SANDBOX_WRITE, which accept paths. If you add to this variable at the end the directory “/run” or your access violated directory you’ll be able to install/compile your package with no problems, for the above problem the solution was:

SANDBOX_WRITE="/usr/tmp/conftest:/usr/lib/conftest:/usr/lib32/conftest:/usr/lib64/conftest:/usr/tmp/cf:/usr/lib/cf:/usr/lib32/cf:/usr/lib64/cf:/run"