Installing plplot on nvc

Hello, I have installed nvc compilers and am trying to install pyplot from AUR (on manjaro linux). I’m getting a Cmake error below:

CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:69 (message):
  The C compiler


  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /var/tmp/pamac-build-usbfvlaeef/plplot/src/plplot-5.15.0/build/CMakeFiles/CMakeTmp
    Run Build Command(s):/usr/bin/make -f Makefile cmTC_bdbc2/fast && /usr/bin/make  -f CMakeFiles/cmTC_bdbc2.dir/build.make CMakeFiles/cmTC_bdbc2.dir/build
    make[1]: Entering directory '/var/tmp/pamac-build-usbfvlaeef/plplot/src/plplot-5.15.0/build/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_bdbc2.dir/testCCompiler.c.o
    /opt/nvidia/hpc_sdk/Linux_x86_64/22.7/compilers/bin/nvc   -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection  -MD -MT CMakeFiles/cmTC_bdbc2.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_bdbc2.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_bdbc2.dir/testCCompiler.c.o -c /var/tmp/pamac-build-usbfvlaeef/plplot/src/plplot-5.15.0/build/CMakeFiles/CMakeTmp/testCCompiler.c
    nvc-Error-Switch -tp with unknown keyword x86-64
                        Select target processor
        px              Generic Linux/Windows x86_64 Processor.
        bulldozer       AMD Bulldozer processor
        piledriver      AMD Piledriver processor
        zen             AMD Zen architecture (Epyc, Ryzen)
        zen2            AMD Zen 2 architecture (Ryzen 2)
        zen3            AMD Zen 3 architecture (Ryzen 3)
        sandybridge     Intel SandyBridge processor
        haswell         Intel Haswell processor
        skylake         Intel Skylake Xeon processor
        host            Link native version of HPC SDK cpu math library
        native          Alias for -tp host
    make[1]: *** [CMakeFiles/cmTC_bdbc2.dir/build.make:79: CMakeFiles/cmTC_bdbc2.dir/testCCompiler.c.o] Error 1
    make[1]: Leaving directory '/var/tmp/pamac-build-usbfvlaeef/plplot/src/plplot-5.15.0/build/CMakeFiles/CMakeTmp'
    make: *** [Makefile:127: cmTC_bdbc2/fast] Error 2

Is it that cmake is trying to use nvc with some unknown switches, as per nvc-Error-Switch -tp with unknown keyword x86-64?

It looks like CMake is using GNU flags here. Not just “-march” (which we accept as an alias to “-tp”), but the others as well.

Kitware only added support for the NV HPC drivers a few years ago (See HERE) so they may be using an older CMake version that doesn’t have this support.

Try using the PGI “pgcc” driver instead of “nvc” to see if it sets the flags correctly. For compatibility we still ship the PGI drivers, which are just links to the NV drivers.


Apologies, @MatColgrove. I’m a bit of a novice here. Would you know how would I go about designating this in the pkgbuild file?

I don’t know anything about pkgbuild, but when I use CMake, I set the environment variables “CC” to set the C compiler and “CXX” to set the C++ compiler.

From bash, this would be “export CC=pgcc” and “export CXX=pgc++”, or csh “setenv CC pgcc” and “setenv CXX pgc++”

Just letting you know, for any frustrated followers of this thread, I ended up setting the CC and CXX environment variables to gcc by inserting two lines into the pkgbuild file, namely:


In the build function of the pkgbuild file for Plplot, making it:

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  if [ -d build ]; then
      rm -r build
  mkdir build
  cd build
      -DENABLE_octave=off \
      -DENABLE_tcl=ON \
      -DENABLE_tk=ON \
      -DPLPLOT_USE_QT5=1 \
      -DPL_FREETYPE_FONT_PATH=/usr/share/fonts/TTF ..
  find . -name '*.make' -exec sed -i 's|-isystem /usr/include ||g' '{}' ';'

With this configuration, I was able to build the AUR.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.