Hi,

The commands are as follows. Their ouptut attached.

$./configure --prefix=/XYZ/hwloc-0.9.2/Installation_Dir/ | tee config.out
$make | tee make.out
$make install | tee mke-install.out

hwloc seems to have installed correctly. But I was unable to run the programs 
in the test folder.

Specifically, ran the following commands.

CFLAGS += $(pkg-config --cflags hwloc)
LDLIBS += $(pkg-config --libs hwloc)
cc hwloc-hello.c $(CFLAGS) -o hwloc-hello $(LDLIBS)
 
 

PKG_CONFIG_PATH didn't have the hwloc path defined. Hence used 
pkg-config -define-variable=VARIABLENAME=VARIABLEVALUE
to specify the directory in which hwloc.pc exists.

Getting the following errors when I try to compile hwloc_bind.c 

cc hwloc_bind.c $(CFLAGS) -o hwloc-hello $(LDLIBS)
-bash: CFLAGS: command not found
-bash: LDLIBS: command not found
hwloc_bind.c:10:19: error: hwloc.h: No such file or directory
hwloc_bind.c:11:28: error: private/config.h: No such file or directory
hwloc_bind.c:14: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before 
âtopologyâ
hwloc_bind.c:24: error: expected â)â before âcpusetâ
hwloc_bind.c: In function âmainâ:
hwloc_bind.c:44: error: âhwloc_cpuset_tâ undeclared (first use in this function)
hwloc_bind.c:44: error: (Each undeclared identifier is reported only once
hwloc_bind.c:44: error: for each function it appears in.)
hwloc_bind.c:44: error: expected â;â before âsetâ
hwloc_bind.c:45: error: âhwloc_obj_tâ undeclared (first use in this function)
hwloc_bind.c:45: error: expected â;â before âobjâ
hwloc_bind.c:48: error: âtopologyâ undeclared (first use in this function)
hwloc_bind.c:51: error: âobjâ undeclared (first use in this function)
hwloc_bind.c:52: error: âsetâ undeclared (first use in this function)
hwloc_bind.c:67: error: âHWLOC_CPUBIND_STRICTâ undeclared (first use in this 
function)

Essentially seems like it's not able to link or include hwloc.h and the method 
definitions.

Can you please help in this matter.
- How to get this running.
- How to compile and run a sample hwloc program.

Thank you very much.

With regards,
Sanket


      The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking for hwloc version... 0.9.2
checking if this is a developer build... no (doxygen generation is optional)
checking for doxygen... /usr/bin/doxygen
checking for pdflatex... no
checking for makeindex... no
checking for fig2dev... no
checking if can build doxygen docs... no
checking for w3m... no
checking for lynx... no
checking if can build top-level README... no
checking if will build doxygen docs... no
checking if will install doxygen docs... no
checking which OS support to include... Linux
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether gcc and cc understand -c and -o together... yes
checking for gcc option to accept ISO C99... -std=gnu99
checking whether ln -s works... yes
checking for egrep... (cached) /bin/grep -E
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking whether diff accepts -u... -u
checking size of unsigned long... 8
checking size of unsigned int... 4
checking for strncasecmp... yes
checking whether function strncasecmp is declared... yes
checking for wchar_t... yes
checking for putwc... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for setlocale... yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking for nl_langinfo... yes
checking curses.h usability... yes
checking curses.h presence... yes
checking for curses.h... yes
checking for term.h... yes
checking for tparm in -ltermcap... no
checking for KAFFINITY... no
checking for PROCESSOR_CACHE_TYPE... no
checking for CACHE_DESCRIPTOR... no
checking for LOGICAL_PROCESSOR_RELATIONSHIP... no
checking for SYSTEM_LOGICAL_PROCESSOR_INFORMATION... no
checking for GROUP_AFFINITY... no
checking for PROCESSOR_RELATIONSHIP... no
checking for NUMA_NODE_RELATIONSHIP... no
checking for CACHE_RELATIONSHIP... no
checking for PROCESSOR_GROUP_INFO... no
checking for GROUP_RELATIONSHIP... no
checking for SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX... no
checking for main in -lgdi32... no
checking windows.h usability... no
checking windows.h presence... no
checking for windows.h... no
checking sys/lgrp_user.h usability... no
checking sys/lgrp_user.h presence... no
checking for sys/lgrp_user.h... no
checking kstat.h usability... no
checking kstat.h presence... no
checking for kstat.h... no
checking infiniband/verbs.h usability... no
checking infiniband/verbs.h presence... no
checking for infiniband/verbs.h... no
checking whether _SC_NPROCESSORS_ONLN is declared... yes
checking whether _SC_NPROCESSORS_CONF is declared... yes
checking whether _SC_NPROC_ONLN is declared... no
checking whether _SC_NPROC_CONF is declared... no
checking whether _SC_LARGE_PAGESIZE is declared... no
checking mach/mach_host.h usability... no
checking mach/mach_host.h presence... no
checking for mach/mach_host.h... no
checking mach/mach_init.h usability... no
checking mach/mach_init.h presence... no
checking for mach/mach_init.h... no
checking for pthread_t... yes
checking for old prototype of sched_setaffinity... no
checking for working CPU_SET... yes
checking for CAIRO... no
checking for XML... yes
checking for KERRIGHED... no
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc -std=gnu99... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 98304
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc -std=gnu99 object... ok
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no
checking for gcc -std=gnu99 option to produce PIC... -fPIC -DPIC
checking if gcc -std=gnu99 PIC flag -fPIC -DPIC works... yes
checking if gcc -std=gnu99 static flag -static works... yes
checking if gcc -std=gnu99 supports -c -o file.o... yes
checking if gcc -std=gnu99 supports -c -o file.o... (cached) yes
checking whether the gcc -std=gnu99 linker (/usr/bin/ld -m elf_x86_64) supports 
shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for lib... no
checking whether debug is enabled... no
checking for bash... /bin/sh
checking for ffs... yes
checking whether function ffs is declared... yes
checking for ffsl... yes
checking whether function ffsl is declared... yes
checking for fls... no
checking for flsl... no
checking for clz... no
checking for clzl... no
checking for openat... yes
checking whether numa_bitmask_alloc is declared... no
checking whether pthread_setaffinity_np is declared... yes
checking for sched_setaffinity... yes
checking for xmllint... xmllint
configure: creating ./config.status
config.status: creating hwloc.pc
config.status: creating doc/doxygen-config.cfg
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating include/Makefile
config.status: creating src/Makefile
config.status: creating tests/Makefile
config.status: creating tests/linux/Makefile
config.status: creating tests/linux/gather-topology.sh
config.status: creating tests/linux/test-topology.sh
config.status: creating tests/lstopo_xml.sh
config.status: creating tests/ports/Makefile
config.status: creating utils/Makefile
config.status: creating utils/test-hwloc-distrib.sh
config.status: creating include/private/config.h
config.status: include/private/config.h is unchanged
config.status: creating include/hwloc/config.h
config.status: include/hwloc/config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing linux-topology-scripts commands
Making install in src
make[1]: Entering directory `/home/tavarage/hwloc-0.9.2/src'
make[2]: Entering directory `/home/tavarage/hwloc-0.9.2/src'
test -z "/home/tavarage/hwloc-0.9.2/Installation_Dir/lib" || /bin/mkdir -p 
"/home/tavarage/hwloc-0.9.2/Installation_Dir/lib"
 /bin/sh ../libtool   --mode=install /usr/bin/install -c   libhwloc.la 
'/home/tavarage/hwloc-0.9.2/Installation_Dir/lib'
libtool: install: /usr/bin/install -c .libs/libhwloc.so.0.0.0 
/home/tavarage/hwloc-0.9.2/Installation_Dir/lib/libhwloc.so.0.0.0
libtool: install: (cd /home/tavarage/hwloc-0.9.2/Installation_Dir/lib && { ln 
-s -f libhwloc.so.0.0.0 libhwloc.so.0 || { rm -f libhwloc.so.0 && ln -s 
libhwloc.so.0.0.0 libhwloc.so.0; }; })
libtool: install: (cd /home/tavarage/hwloc-0.9.2/Installation_Dir/lib && { ln 
-s -f libhwloc.so.0.0.0 libhwloc.so || { rm -f libhwloc.so && ln -s 
libhwloc.so.0.0.0 libhwloc.so; }; })
libtool: install: /usr/bin/install -c .libs/libhwloc.lai 
/home/tavarage/hwloc-0.9.2/Installation_Dir/lib/libhwloc.la
libtool: install: /usr/bin/install -c .libs/libhwloc.a 
/home/tavarage/hwloc-0.9.2/Installation_Dir/lib/libhwloc.a
libtool: install: chmod 644 
/home/tavarage/hwloc-0.9.2/Installation_Dir/lib/libhwloc.a
libtool: install: ranlib 
/home/tavarage/hwloc-0.9.2/Installation_Dir/lib/libhwloc.a
make  install-exec-hook
make[3]: Entering directory `/home/tavarage/hwloc-0.9.2/src'
make[3]: Nothing to be done for `install-exec-hook'.
make[3]: Leaving directory `/home/tavarage/hwloc-0.9.2/src'
test -z "/home/tavarage/hwloc-0.9.2/Installation_Dir/share/hwloc" || /bin/mkdir 
-p "/home/tavarage/hwloc-0.9.2/Installation_Dir/share/hwloc"
 /usr/bin/install -c -m 644 ./hwloc.dtd 
'/home/tavarage/hwloc-0.9.2/Installation_Dir/share/hwloc'
make[2]: Leaving directory `/home/tavarage/hwloc-0.9.2/src'
make[1]: Leaving directory `/home/tavarage/hwloc-0.9.2/src'
Making install in utils
make[1]: Entering directory `/home/tavarage/hwloc-0.9.2/utils'
make[2]: Entering directory `/home/tavarage/hwloc-0.9.2/utils'
test -z "/home/tavarage/hwloc-0.9.2/Installation_Dir/bin" || /bin/mkdir -p 
"/home/tavarage/hwloc-0.9.2/Installation_Dir/bin"
  /bin/sh ../libtool   --mode=install /usr/bin/install -c lstopo hwloc-mask 
hwloc-bind hwloc-distrib '/home/tavarage/hwloc-0.9.2/Installation_Dir/bin'
libtool: install: /usr/bin/install -c .libs/lstopo 
/home/tavarage/hwloc-0.9.2/Installation_Dir/bin/lstopo
libtool: install: /usr/bin/install -c .libs/hwloc-mask 
/home/tavarage/hwloc-0.9.2/Installation_Dir/bin/hwloc-mask
libtool: install: /usr/bin/install -c .libs/hwloc-bind 
/home/tavarage/hwloc-0.9.2/Installation_Dir/bin/hwloc-bind
libtool: install: /usr/bin/install -c .libs/hwloc-distrib 
/home/tavarage/hwloc-0.9.2/Installation_Dir/bin/hwloc-distrib
make  install-exec-hook
make[3]: Entering directory `/home/tavarage/hwloc-0.9.2/utils'
test -z "/home/tavarage/hwloc-0.9.2/Installation_Dir/share/man/man1" || 
/bin/mkdir -p "/home/tavarage/hwloc-0.9.2/Installation_Dir/share/man/man1"
 /usr/bin/install -c -m 644 lstopo.1 hwloc-bind.1 hwloc-distrib.1 hwloc-mask.1 
'/home/tavarage/hwloc-0.9.2/Installation_Dir/share/man/man1'
rm -f /home/tavarage/hwloc-0.9.2/Installation_Dir/bin/hwloc-ls 
/home/tavarage/hwloc-0.9.2/Installation_Dir/bin/hwloc-info
cd /home/tavarage/hwloc-0.9.2/Installation_Dir/bin && ln -s lstopo hwloc-ls && 
ln -s lstopo hwloc-info
rm -f /home/tavarage/hwloc-0.9.2/Installation_Dir/share/man/man1/hwloc-ls.1 
/home/tavarage/hwloc-0.9.2/Installation_Dir/share/man/man1/hwloc-info.1
cd /home/tavarage/hwloc-0.9.2/Installation_Dir/share/man/man1 && ln -s lstopo.1 
hwloc-ls.1 && ln -s lstopo.1 hwloc-info.1
make[3]: Leaving directory `/home/tavarage/hwloc-0.9.2/utils'
test -z "/home/tavarage/hwloc-0.9.2/Installation_Dir/share/man/man1" || 
/bin/mkdir -p "/home/tavarage/hwloc-0.9.2/Installation_Dir/share/man/man1"
 /usr/bin/install -c -m 644 lstopo.1 hwloc-bind.1 hwloc-distrib.1 hwloc-mask.1 
'/home/tavarage/hwloc-0.9.2/Installation_Dir/share/man/man1'
make[2]: Leaving directory `/home/tavarage/hwloc-0.9.2/utils'
make[1]: Leaving directory `/home/tavarage/hwloc-0.9.2/utils'
Making install in tests
make[1]: Entering directory `/home/tavarage/hwloc-0.9.2/tests'
Making install in linux
make[2]: Entering directory `/home/tavarage/hwloc-0.9.2/tests/linux'
make[3]: Entering directory `/home/tavarage/hwloc-0.9.2/tests/linux'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/home/tavarage/hwloc-0.9.2/tests/linux'
make[2]: Leaving directory `/home/tavarage/hwloc-0.9.2/tests/linux'
Making install in ports
make[2]: Entering directory `/home/tavarage/hwloc-0.9.2/tests/ports'
make[3]: Entering directory `/home/tavarage/hwloc-0.9.2/tests/ports'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/home/tavarage/hwloc-0.9.2/tests/ports'
make[2]: Leaving directory `/home/tavarage/hwloc-0.9.2/tests/ports'
make[2]: Entering directory `/home/tavarage/hwloc-0.9.2/tests'
make[3]: Entering directory `/home/tavarage/hwloc-0.9.2/tests'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/home/tavarage/hwloc-0.9.2/tests'
make[2]: Leaving directory `/home/tavarage/hwloc-0.9.2/tests'
make[1]: Leaving directory `/home/tavarage/hwloc-0.9.2/tests'
Making install in include
make[1]: Entering directory `/home/tavarage/hwloc-0.9.2/include'
make[2]: Entering directory `/home/tavarage/hwloc-0.9.2/include'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/home/tavarage/hwloc-0.9.2/Installation_Dir/include" || /bin/mkdir -p 
"/home/tavarage/hwloc-0.9.2/Installation_Dir/include"
 /usr/bin/install -c -m 644 hwloc.h 
'/home/tavarage/hwloc-0.9.2/Installation_Dir/include'
test -z "/home/tavarage/hwloc-0.9.2/Installation_Dir/include/hwloc" || 
/bin/mkdir -p "/home/tavarage/hwloc-0.9.2/Installation_Dir/include/hwloc"
 /usr/bin/install -c -m 644 hwloc/cpuset.h hwloc/helper.h 
hwloc/openfabrics-verbs.h hwloc/linux.h hwloc/linux-libnuma.h 
hwloc/glibc-sched.h '/home/tavarage/hwloc-0.9.2/Installation_Dir/include/hwloc'
test -z "/home/tavarage/hwloc-0.9.2/Installation_Dir/include/hwloc" || 
/bin/mkdir -p "/home/tavarage/hwloc-0.9.2/Installation_Dir/include/hwloc"
 /usr/bin/install -c -m 644 hwloc/config.h 
'/home/tavarage/hwloc-0.9.2/Installation_Dir/include/hwloc'
make[2]: Leaving directory `/home/tavarage/hwloc-0.9.2/include'
make[1]: Leaving directory `/home/tavarage/hwloc-0.9.2/include'
Making install in doc
make[1]: Entering directory `/home/tavarage/hwloc-0.9.2/doc'
make  install-am
make[2]: Entering directory `/home/tavarage/hwloc-0.9.2/doc'
make[3]: Entering directory `/home/tavarage/hwloc-0.9.2/doc'
make[3]: Nothing to be done for `install-exec-am'.
test -z "/home/tavarage/hwloc-0.9.2/Installation_Dir/share/doc/hwloc" || 
/bin/mkdir -p "/home/tavarage/hwloc-0.9.2/Installation_Dir/share/doc/hwloc"
test -z "/home/tavarage/hwloc-0.9.2/Installation_Dir/share/man/man3" || 
/bin/mkdir -p "/home/tavarage/hwloc-0.9.2/Installation_Dir/share/man/man3"
make[3]: Leaving directory `/home/tavarage/hwloc-0.9.2/doc'
make[2]: Leaving directory `/home/tavarage/hwloc-0.9.2/doc'
make[1]: Leaving directory `/home/tavarage/hwloc-0.9.2/doc'
make[1]: Entering directory `/home/tavarage/hwloc-0.9.2'
make[2]: Entering directory `/home/tavarage/hwloc-0.9.2'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/home/tavarage/hwloc-0.9.2/Installation_Dir/lib/pkgconfig" || 
/bin/mkdir -p "/home/tavarage/hwloc-0.9.2/Installation_Dir/lib/pkgconfig"
 /usr/bin/install -c -m 644 hwloc.pc 
'/home/tavarage/hwloc-0.9.2/Installation_Dir/lib/pkgconfig'
make[2]: Leaving directory `/home/tavarage/hwloc-0.9.2'
make[1]: Leaving directory `/home/tavarage/hwloc-0.9.2'
Making all in src
make[1]: Entering directory `/home/tavarage/hwloc-0.9.2/src'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/tavarage/hwloc-0.9.2/src'
Making all in utils
make[1]: Entering directory `/home/tavarage/hwloc-0.9.2/utils'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/tavarage/hwloc-0.9.2/utils'
Making all in tests
make[1]: Entering directory `/home/tavarage/hwloc-0.9.2/tests'
Making all in linux
make[2]: Entering directory `/home/tavarage/hwloc-0.9.2/tests/linux'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/tavarage/hwloc-0.9.2/tests/linux'
Making all in ports
make[2]: Entering directory `/home/tavarage/hwloc-0.9.2/tests/ports'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/tavarage/hwloc-0.9.2/tests/ports'
make[2]: Entering directory `/home/tavarage/hwloc-0.9.2/tests'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/tavarage/hwloc-0.9.2/tests'
make[1]: Leaving directory `/home/tavarage/hwloc-0.9.2/tests'
Making all in include
make[1]: Entering directory `/home/tavarage/hwloc-0.9.2/include'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/tavarage/hwloc-0.9.2/include'
Making all in doc
make[1]: Entering directory `/home/tavarage/hwloc-0.9.2/doc'
make  all-am
make[2]: Entering directory `/home/tavarage/hwloc-0.9.2/doc'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/tavarage/hwloc-0.9.2/doc'
make[1]: Leaving directory `/home/tavarage/hwloc-0.9.2/doc'
make[1]: Entering directory `/home/tavarage/hwloc-0.9.2'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/home/tavarage/hwloc-0.9.2'

Reply via email to