Observed "fatal error: limits.h: No such file or directory" when compiling pyslurm-18.08.0

44 views
Skip to first unread message

cco...@nvidia.com

unread,
Mar 19, 2019, 3:06:50 PM3/19/19
to pyslurm
I observed the following error when trying to build Pyslurm. I'm using Python 3.6, Slurm 18.08.6.1, and Cython 0.29.6.
Any assistance would be appreciated. I also tried using python 3.4, but the same error was observed. Thanks!


creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/pyslurm
/home/utils/gcc-4.8.4/bin/gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/home/utils/gcc-4.8.4/include -I/home/utils/openssl-1.0.2/include -I/home/utils/sqlite-3.8.6/include -I/home/utils/gcc-4.8.4/include -I/home/utils/openssl-1.0.2/include -I/home/utils/sqlite-3.8.6/include -fPIC -I/usr/include/slurm/ -I. -I/home/scratch.ccoser_inf/workspace/cmd_line/include -I/home/utils/Python-3.6.1/include/python3.6m -c pyslurm/pyslurm.c -o build/temp.linux-x86_64-3.6/pyslurm/pyslurm.o
In file included from /home/utils/gcc-4.8.4/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/include-fixed/syslimits.h:7:0,
                 from /home/utils/gcc-4.8.4/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/include-fixed/limits.h:34,
                 from /home/utils/Python-3.6.1/include/python3.6m/Python.h:11,
                 from pyslurm/pyslurm.c:4:
/home/utils/gcc-4.8.4/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory
 #include_next <limits.h>  /* recurse down to the real one */
                                                             ^
compilation terminated.
error: command '/home/utils/gcc-4.8.4/bin/gcc' failed with exit status 1

cco...@nvidia.com

unread,
Mar 19, 2019, 4:14:14 PM3/19/19
to pyslurm
I got around the issue above by installing packages:

  • libc6-dev
  • gcc-multilib
  • g++-multilib

I now get the following error and am investigating...

fatal error: xlocale.h: No such file or directory

cco...@nvidia.com

unread,
Mar 19, 2019, 4:35:54 PM3/19/19
to pyslurm
Current error:

pyslurm/pyslurm.c:95817:1: error: expected ‘{’ at end of input

Kind of at a loss at this point.

Giovanni

unread,
Mar 19, 2019, 6:59:38 PM3/19/19
to pyslurm
Which OS are you using?  I'm guessing debian or ubuntu?  Let me know and I can try to replicate.

Giovanni

cco...@nvidia.com

unread,
Mar 20, 2019, 8:52:58 AM3/20/19
to pyslurm
Thanks Giovanni! 

I'm on Ubuntu 18.04.2 LTS.

Chris

Giovanni

unread,
Mar 21, 2019, 6:39:18 PM3/21/19
to pyslurm
I got it to compile in an ubuntu container using your versions:

################################

FROM ubuntu:18.04

ARG packages="git gcc make zlib1g-dev python python3 python3-pip build-essential gcc default-libmysqlclient-dev"

RUN set -ex \
    && apt-get update \
    && apt-get -y install $packages

RUN set -ex \
    && git clone https://github.com/SchedMD/slurm.git \
    && cd slurm \
    && git checkout slurm-18-08-6-1 \
    && ./configure --enable-debug --prefix=/usr --sysconfdir=/etc/slurm --with-mysql_config=/usr/bin \
    && make install \
    && cd /

RUN set -ex \
    && git clone https://github.com/pyslurm/pyslurm.git \
    && cd pyslurm \
    && pip3 install Cython \
    && git checkout 18-08-6 \
    && python3 setup.py build --slurm-lib=/usr/lib --slurm-inc=/usr/include \
    && python3 setup.py install

################################


Hope that helps.

Giovanni

cco...@nvidia.com

unread,
Mar 26, 2019, 3:23:55 PM3/26/19
to pyslurm
Thanks for the dockerfile! Managed to get it to build. Now that I have a working example, hopefully I can get all the environmental considerations worked out.

Thanks again.

Chris
Reply all
Reply to author
Forward
0 new messages