GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — BUG: f2py compile fail, require C99 standard · Issue #22572 · numpy/numpy Closed DescriptionDescribe the issue:After I ran I don't find an entrance to pass My codes if it's needed: test_sub.pyf: Reproduce the code example:!f2py -c test_sub.f90 test_sub.pyf Error message:running build running config_cc INFO: unifing config_cc, config, build_clib, build_ext, build commands --compiler options running config_fc INFO: unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options running build_src INFO: build_src INFO: building extension "test_sub" sources creating /tmp/tmphlgqv6nk/src.linux-x86_64-3.8 INFO: f2py options: [] INFO: f2py: test_sub.pyf Reading fortran codes... Reading file 'test_sub.pyf' (format:free) Post-processing... Block: test_sub Block: test_sub Post-processing (stage 2)... Building modules... Building module "test_sub"... Generating possibly empty wrappers" Maybe empty "test_sub-f2pywrappers2.f90" Maybe empty "test_sub-f2pywrappers.f" Creating wrapper for Fortran subroutine "test_sub"("test_sub")... Constructing wrapper function "test_sub"... getctype: "real(kind=real32)" is mapped to C "float" (to override define dict(real = dict(real32="<C typespec>")) in /data/jtrapp/a/songning/f_cape/.f2py_f2cmap file). getctype: "real(kind=real32)" is mapped to C "float" (to override define dict(real = dict(real32="<C typespec>")) in /data/jtrapp/a/songning/f_cape/.f2py_f2cmap file). getctype: "real(kind=real32)" is mapped to C "float" (to override define dict(real = dict(real32="<C typespec>")) in /data/jtrapp/a/songning/f_cape/.f2py_f2cmap file). test_sub(a) Wrote C/API module "test_sub" to file "/tmp/tmphlgqv6nk/src.linux-x86_64-3.8/test_submodule.c" Fortran 90 wrappers are saved to "/tmp/tmphlgqv6nk/src.linux-x86_64-3.8/test_sub-f2pywrappers2.f90" INFO: adding '/tmp/tmphlgqv6nk/src.linux-x86_64-3.8/fortranobject.c' to sources. INFO: adding '/tmp/tmphlgqv6nk/src.linux-x86_64-3.8' to include_dirs. copying /data/keeling/a/songning/miniconda3/envs/default/lib/python3.8/site-packages/numpy/f2py/src/fortranobject.c -> /tmp/tmphlgqv6nk/src.linux-x86_64-3.8 copying /data/keeling/a/songning/miniconda3/envs/default/lib/python3.8/site-packages/numpy/f2py/src/fortranobject.h -> /tmp/tmphlgqv6nk/src.linux-x86_64-3.8 INFO: adding '/tmp/tmphlgqv6nk/src.linux-x86_64-3.8/test_sub-f2pywrappers.f' to sources. INFO: adding '/tmp/tmphlgqv6nk/src.linux-x86_64-3.8/test_sub-f2pywrappers2.f90' to sources. INFO: build_src: building npy-pkg config files /data/keeling/a/songning/miniconda3/envs/default/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build_ext INFO: customize UnixCCompiler INFO: customize UnixCCompiler using build_ext INFO: get_default_fcompiler: matching types: '['arm', 'gnu95', 'intel', 'lahey', 'pg', 'nv', 'absoft', 'nag', 'vast', 'compaq', 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor', 'fujitsu']' INFO: customize ArmFlangCompiler WARN: Could not locate executable armflang INFO: customize Gnu95FCompiler INFO: Found executable /usr/bin/gfortran INFO: customize Gnu95FCompiler INFO: customize Gnu95FCompiler using build_ext INFO: building 'test_sub' extension INFO: compiling C sources INFO: C compiler: gcc -pthread -B /data/keeling/a/songning/miniconda3/envs/default/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /data/keeling/a/songning/miniconda3/envs/default/include -fPIC -O2 -isystem /data/keeling/a/songning/miniconda3/envs/default/include -fPIC creating /tmp/tmphlgqv6nk/tmp creating /tmp/tmphlgqv6nk/tmp/tmphlgqv6nk creating /tmp/tmphlgqv6nk/tmp/tmphlgqv6nk/src.linux-x86_64-3.8 INFO: compile options: '-DNPY_DISABLE_OPTIMIZATION=1 -I/tmp/tmphlgqv6nk/src.linux-x86_64-3.8 -I/data/keeling/a/songning/miniconda3/envs/default/lib/python3.8/site-packages/numpy/core/include -I/data/keeling/a/songning/miniconda3/envs/default/include/python3.8 -c' INFO: gcc: /tmp/tmphlgqv6nk/src.linux-x86_64-3.8/test_submodule.c INFO: gcc: /tmp/tmphlgqv6nk/src.linux-x86_64-3.8/fortranobject.c In file included from /data/keeling/a/songning/miniconda3/envs/default/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1948:0, from /data/keeling/a/songning/miniconda3/envs/default/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12, from /data/keeling/a/songning/miniconda3/envs/default/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:5, from /tmp/tmphlgqv6nk/src.linux-x86_64-3.8/fortranobject.h:13, from /tmp/tmphlgqv6nk/src.linux-x86_64-3.8/fortranobject.c:2: /data/keeling/a/songning/miniconda3/envs/default/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp] #warning "Using deprecated NumPy API, disable it with " \ ^ In file included from /data/keeling/a/songning/miniconda3/envs/default/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1948:0, from /data/keeling/a/songning/miniconda3/envs/default/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12, from /data/keeling/a/songning/miniconda3/envs/default/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:5, from /tmp/tmphlgqv6nk/src.linux-x86_64-3.8/fortranobject.h:13, from /tmp/tmphlgqv6nk/src.linux-x86_64-3.8/test_submodule.c:23: /data/keeling/a/songning/miniconda3/envs/default/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp] #warning "Using deprecated NumPy API, disable it with " \ ^ /tmp/tmphlgqv6nk/src.linux-x86_64-3.8/test_submodule.c:144:12: warning: ‘f2py_size’ defined but not used [-Wunused-function] static int f2py_size(PyArrayObject* var, ...) ^ /tmp/tmphlgqv6nk/src.linux-x86_64-3.8/fortranobject.c: In function ‘find_first_negative_dimension’: /tmp/tmphlgqv6nk/src.linux-x86_64-3.8/fortranobject.c:707:5: error: ‘for’ loop initial declarations are only allowed in C99 mode for (int i = 0; i < rank; ++i) { ^ /tmp/tmphlgqv6nk/src.linux-x86_64-3.8/fortranobject.c:707:5: note: use option -std=c99 or -std=gnu99 to compile your code error: Command "gcc -pthread -B /data/keeling/a/songning/miniconda3/envs/default/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /data/keeling/a/songning/miniconda3/envs/default/include -fPIC -O2 -isystem /data/keeling/a/songning/miniconda3/envs/default/include -fPIC -DNPY_DISABLE_OPTIMIZATION=1 -I/tmp/tmphlgqv6nk/src.linux-x86_64-3.8 -I/data/keeling/a/songning/miniconda3/envs/default/lib/python3.8/site-packages/numpy/core/include -I/data/keeling/a/songning/miniconda3/envs/default/include/python3.8 -c /tmp/tmphlgqv6nk/src.linux-x86_64-3.8/fortranobject.c -o /tmp/tmphlgqv6nk/tmp/tmphlgqv6nk/src.linux-x86_64-3.8/fortranobject.o -MMD -MF /tmp/tmphlgqv6nk/tmp/tmphlgqv6nk/src.linux-x86_64-3.8/fortranobject.o.d" failed with exit status 1 NumPy/Python version information:1.23.4 Context for the issue:No response Activity
MetadataMetadataAssigneesTypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |