Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.7.0: build fails with gcc error #86

Open
kloczek opened this issue Feb 26, 2024 · 3 comments
Open

1.7.0: build fails with gcc error #86

kloczek opened this issue Feb 26, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@kloczek
Copy link

kloczek commented Feb 26, 2024

What happened?

Build fails with gcc error

What are the steps to reproduce the bug?

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

  • python3 -sBm build -w --no-isolation
  • because I'm calling build with --no-isolation I'm using during all processes only locally installed modules

Version

1.7.0

Platform (OS and architecture)

Linux/x86_64

Relevant log output

+ cd eccodes-python-1.7.0
+ ASMFLAGS='-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security'
+ CFLAGS='-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security'
+ CXXFLAGS='-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security'
+ FFLAGS='-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -I/usr/lib64/gfortran/modules'
+ FCFLAGS='-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -I/usr/lib64/gfortran/modules'
+ LDFLAGS='-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,pack-relative-relocs -flto=auto -fuse-linker-plugin'
+ RUSTFLAGS='-C codegen-units=1 -C debuginfo=2 -C opt-level=2 -C link-arg=-Wl,--as-needed -C link-arg=-Wl,--build-id=sha1 -C link-arg=-Wl,-z,now -C link-arg=-specs=/usr/lib/rpm/redhat/redhat-hardened-ld -C link-arg=-Wl,-z,pack-relative-relocs -C link-arg=-Wl,-z,relro -C link-arg=-flto=auto --cap-lints=warn'
+ VALAFLAGS=-g
+ CC=/usr/bin/gcc
+ CXX=/usr/bin/g++
+ FC=/usr/bin/gfortran
+ AR=/usr/bin/gcc-ar
+ NM=/usr/bin/gcc-nm
+ RANLIB=/usr/bin/gcc-ranlib
+ export ASMFLAGS CFLAGS CXXFLAGS FFLAGS FCFLAGS LDFLAGS VALAFLAGS CC CXX FC AR NM RANLIB RUSTFLAGS VALAFLAGS
+ PBR_VERSION=1.7.0
+ PDM_BUILD_SCM_VERSION=1.7.0
+ SETUPTOOLS_SCM_PRETEND_VERSION=1.7.0
+ /usr/bin/python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...
* Building wheel...
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-38
creating build/lib.linux-x86_64-cpython-38/eccodes
copying eccodes/__init__.py -> build/lib.linux-x86_64-cpython-38/eccodes
copying eccodes/__main__.py -> build/lib.linux-x86_64-cpython-38/eccodes
copying eccodes/eccodes.py -> build/lib.linux-x86_64-cpython-38/eccodes
creating build/lib.linux-x86_64-cpython-38/gribapi
copying gribapi/__init__.py -> build/lib.linux-x86_64-cpython-38/gribapi
copying gribapi/bindings.py -> build/lib.linux-x86_64-cpython-38/gribapi
copying gribapi/errors.py -> build/lib.linux-x86_64-cpython-38/gribapi
copying gribapi/gribapi.py -> build/lib.linux-x86_64-cpython-38/gribapi
creating build/lib.linux-x86_64-cpython-38/eccodes/highlevel
copying eccodes/highlevel/__init__.py -> build/lib.linux-x86_64-cpython-38/eccodes/highlevel
copying eccodes/highlevel/message.py -> build/lib.linux-x86_64-cpython-38/eccodes/highlevel
copying eccodes/highlevel/reader.py -> build/lib.linux-x86_64-cpython-38/eccodes/highlevel
running egg_info
creating eccodes.egg-info
writing eccodes.egg-info/PKG-INFO
writing dependency_links to eccodes.egg-info/dependency_links.txt
writing requirements to eccodes.egg-info/requires.txt
writing top-level names to eccodes.egg-info/top_level.txt
writing manifest file 'eccodes.egg-info/SOURCES.txt'
reading manifest file 'eccodes.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.yml'
warning: no files found matching '*.in' under directory 'ci'
warning: no files found matching '*.txt' under directory 'ci'
warning: no files found matching '*.yml' under directory 'ci'
warning: no files found matching '*.ps1' under directory 'ci'
warning: no files found matching '*.ipynb' under directory 'tests'
adding license file 'LICENSE'
writing manifest file 'eccodes.egg-info/SOURCES.txt'
copying gribapi/eccodes.h -> build/lib.linux-x86_64-cpython-38/gribapi
copying gribapi/grib_api.h -> build/lib.linux-x86_64-cpython-38/gribapi
running build_ext
generating cffi module 'build/temp.linux-x86_64-cpython-38/gribapi._bindings.c'
creating build/temp.linux-x86_64-cpython-38
building 'gribapi._bindings' extension
creating build/temp.linux-x86_64-cpython-38/build
creating build/temp.linux-x86_64-cpython-38/build/temp.linux-x86_64-cpython-38
/usr/bin/gcc -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -fno-semantic-interposition -D_GNU_SOURCE -fPIC -fwrapv -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -fno-semantic-interposition -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -fno-semantic-interposition -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -fPIC -I/usr/include/python3.8 -c build/temp.linux-x86_64-cpython-38/gribapi._bindings.c -o build/temp.linux-x86_64-cpython-38/build/temp.linux-x86_64-cpython-38/gribapi._bindings.o
build/temp.linux-x86_64-cpython-38/gribapi._bindings.c: In function ‘_cffi_d_codes_extract_offsets_sizes_malloc’:
build/temp.linux-x86_64-cpython-38/gribapi._bindings.c:1727:10: error: implicit declaration of function ‘codes_extract_offsets_sizes_malloc’; did you mean ‘codes_extract_offsets_malloc’? [-Wimplicit-function-declaration]
 1727 |   return codes_extract_offsets_sizes_malloc(x0, x1, x2, x3, x4, x5, x6);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |          codes_extract_offsets_malloc
build/temp.linux-x86_64-cpython-38/gribapi._bindings.c: In function ‘_cffi_d_grib_handle_clone_headers_only’:
build/temp.linux-x86_64-cpython-38/gribapi._bindings.c:3770:10: error: implicit declaration of function ‘grib_handle_clone_headers_only’; did you mean ‘_cffi_d_grib_handle_clone_headers_only’? [-Wimplicit-function-declaration]
 3770 |   return grib_handle_clone_headers_only(x0);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |          _cffi_d_grib_handle_clone_headers_only
build/temp.linux-x86_64-cpython-38/gribapi._bindings.c:3770:10: error: returning ‘int’ from a function with return type ‘grib_handle *’ makes pointer from integer without a cast [-Wint-conversion]
 3770 |   return grib_handle_clone_headers_only(x0);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
build/temp.linux-x86_64-cpython-38/gribapi._bindings.c: In function ‘_cffi_f_grib_handle_clone_headers_only’:
build/temp.linux-x86_64-cpython-38/gribapi._bindings.c:3793:12: error: assignment to ‘grib_handle *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 3793 |   { result = grib_handle_clone_headers_only(x0); }
      |            ^
error: command '/usr/bin/gcc' failed with exit code 1

ERROR Backend subprocess exited when trying to invoke build_wheel

Accompanying data

No response

Organisation

No response

@kloczek kloczek added the bug Something isn't working label Feb 26, 2024
@shahramn
Copy link
Collaborator

Please use the ecCodes library version 2.34.0 ( or higher )

@kloczek
Copy link
Author

kloczek commented Feb 26, 2024

Will try ASP.
Why not use https://pypi.org/project/pkgconfig/ to check version on pep517 build? 🤔

@kloczek
Copy link
Author

kloczek commented Feb 26, 2024

Is it possible to enable issue tracker on https://github.com/ecmwf/eccodes/? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants