Makefile for programming guide tests is broken

Issue #32 resolved
Scott Baden created an issue

Fails in the link step

Comments (15)

  1. Dan Bonachea

    This issue report lacks sufficient information to reproduce the problem.

    Please attach a log of running the current UPCXX install command, so that we can see all the platform, compiler and version information it outputs.

  2. Dan Bonachea

    Here is a log of me installing and building the PG examples in the current develop head (3f95d6f) using the default /usr/bin/g++ compiler on the Sierra OS X 10.12.6 system in our machine room, which is running Xcode 8.3.3

  3. Dan Bonachea

    You need to set CXX='c++ -std=c++11' when running the make command for the prog-guide, at least until we teach upcxx-meta to provide $CXX (which we really should).

    baden@Scotts-iMac:~/upcxx/example/prog-guide?105> make
    c++ compute-pi.cpp -DUPCXX_BACKEND=gasnet1_seq -D_GNU_SOURCE=1 -DGASNET_SEQ -I/Users/baden/bin/upcxx/include -O3 --param max-inline-insns-single=35000 --param inline-unit-growth=10000 --param large-function-growth=200000 -Winline -Wno-unused -Wno-unused-parameter -Wno-address -Wl,-multiply_defined,suppress -Wl,-no_pie -L/Users/baden/bin/upcxx/lib -lupcxx -lgasnet-smp-seq -L/usr/local/lib/gcc/x86_64-apple-darwin15.0.0/5.2.0 -lgcc -o compute-pi 
    In file included from compute-pi.cpp:4:
    In file included from /Users/baden/bin/upcxx/include/upcxx/upcxx.hpp:4:
    In file included from /Users/baden/bin/upcxx/include/upcxx/allocate.hpp:8:
    In file included from /Users/baden/bin/upcxx/include/upcxx/backend.hpp:8:
    In file included from /Users/baden/bin/upcxx/include/upcxx/future.hpp:4:
    In file included from /Users/baden/bin/upcxx/include/upcxx/future/core.hpp:5:
    ?[1m/Users/baden/bin/upcxx/include/upcxx/utility.hpp:21:35: warning: variadic
          templates are a C++11 extension [-Wc++11-extensions]
      template<typename Ret, typename ...Arg>
    

    As a side note, the /usr/local/bin/g++ you are using is rather old (5.2.0) and has some known bugs on Darwin (all the __textcoal_nt crap). It's also a different compiler family from your MPI in /usr/local/Cellar/open-mpi/2.1.1/bin/mpicc, which is clang-based (this can cause subtle interop-problems, and definitely affects relative optimization performance).

    It looks like you have clang 8.1.0 installed (probably in /usr/bin/ from Xcode 8.3). I'd recommend setting your $PATH or $CC/$CXX to use that compiler instead.

  4. Scott Baden reporter

    That broke my current Makefile I comment out the line that set CXX The error is above as Log2.txt

  5. Dan Bonachea

    You need to use the same C/C++ compiler for both installing UPCXX and building applications. I believe you are mixing them, which will very likely break.

    Please start over from scratch with CXX=/usr/bin/g++ CC=/usr/bin/gcc (which is actually clang).

  6. Scott Baden reporter

    Will this work if I am using the C-shell and I specify the environment variables using the C-shell syntax?

  7. Dan Bonachea

    Yes, the equivalent setenv commands will also work.

    You can confirm it's working by looking at the build lines to see that everything is invoking the correct compiler.

  8. Scott Baden reporter

    It has failed again. I wiped my local repo clean, and rebuilt. I've set the compiler variables to use Clang.

  9. Log in to comment