bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling under cygwin


From: Dr . Jürgen Sauermann
Subject: Re: Compiling under cygwin
Date: Thu, 27 Jan 2022 15:16:50 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

Hi Bill,

strange. According to the config log that you kindly provided:

#define HAVE_AFFINITY_NP 1

which means that according to the confgurere.ac of GNU APL lines 291 ff.
the following test program compiled successfully:


#include <pthread.h>
#include <ext/atomicity.h>

int
main()
{                    
  cpu_set_t cpuset;]
  pthread_setaffinity_np(0, sizeof(cpuset), &cpuset);]
  pthread_getaffinity_np(0, sizeof(cpuset), &cpuset);]
 _Atomic_word count = 0;]
  __gnu_cxx::__exchange_and_add_dispatch(&count, 1);]
__gnu_cxx::__atomic_add_dispatch(&count, 1);]
}


But then this fails:

memory_benchmark.cc: In function ‘void multi(int, int, int64_t*)’:
memory_benchmark.cc:147:9: error: ‘CPU_ZERO’ was not declared in this scope
  147 |         CPU_ZERO(&cpus);
      |         ^~~~~~~~
memory_benchmark.cc:148:9: error: ‘CPU_SET’ was not declared in this scope
  148 |         CPU_SET(c, &cpus);
      |         ^~~~~~~
memory_benchmark.cc:149:9: error: ‘pthread_setaffinity_np’ was not declared in this scope
  149 |         pthread_setaffinity_np(ctx[c].thread, sizeof(cpu_set_t), &cpus);
      |         ^~~~~~~~~~~~~~~~~~~~~~
...

I believe that you may need to troubleshoot this a bit deeper on your machine (where are
pthread_setaffinity_np() and CPU_ZERO/CPU_SET defined (supposedly under /usr/local)?

In the meantime you could delete the following lines in tools/Makefile.am:

noinst_PROGRAMS += memory_benchmark
memory_benchmark_SOURCES = memory_benchmark.cc
memory_benchmark_LDADD = -lpthread
memory_benchmark_CXXFLAGS = -Wall

and then autoreconf and ./configure again at  the top-level.

In the meantime I will look into removing the memory_benchmark
from the standard build.

Best Regards,
Jürgen


On 12/28/21 6:22 PM, Bill Daly wrote:
I've encountered errors installing GNU APL on Windows under cygwin.  Configure, Make and Install logs attached

w



reply via email to

[Prev in Thread] Current Thread [Next in Thread]