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

Error compiling from source on fedora 37 #272

Open
MalcolmMielle opened this issue Feb 19, 2023 · 2 comments
Open

Error compiling from source on fedora 37 #272

MalcolmMielle opened this issue Feb 19, 2023 · 2 comments

Comments

@MalcolmMielle
Copy link

MalcolmMielle commented Feb 19, 2023

Compiling rolling from source on Fedora I have the error for qt_gui_cpp:

--- stderr: qt_gui_cpp                                                                                                                                                                  
/usr/bin/ld: cannot open linker script file /builddir/build/BUILD/sip-4.19.25/.package_note-sip-4.19.25-5.fc37.x86_64.ld: No such file or directory
collect2: error: ld returned 1 exit status
gmake[3]: *** [Makefile:38: "/home/malcolmmielle/rolling_ro2/build/qt_gui_cpp/src/qt_gui_cpp_sip/libqt_gui_cpp_sip".so] Error 1
gmake[2]: *** [src/qt_gui_cpp_sip/CMakeFiles/libqt_gui_cpp_sip.dir/build.make:74: src/qt_gui_cpp_sip/libqt_gui_cpp_sip.so] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:253: src/qt_gui_cpp_sip/CMakeFiles/libqt_gui_cpp_sip.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---

both sip and python3-sip-devel are installed.

@TK-Khaw
Copy link

TK-Khaw commented Mar 5, 2023

hi I've been trying to build qt_gui_cpp on Fedora 37 as well and faced the exact same error.

The error seems to originate from ld trying to call a file /builddir/build/BUILD/sip-4.19.25/.package_note-sip-4.19.25-5.fc37.x86_64.ld which I know definitely does not exist on our system, which motivated me to trace the origin of inclusion of this file in LFLAGS .

This led me to the file /usr/lib64/python3.11/site-packages/sipconfig.py,

_default_macros = {
    #...
    'LFLAGS': '-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -Wl,-dT,/builddir/build/BUILD/sip-4.19.25/.package_note-sip-4.19.25-5.fc37.x86_64.ld',
    #...
}

Deleting the flag that leads to the inclusion of the .package_note file had allowed me to compile qt_gui_cpp successfully. I am unsure why is the flag there, but it seems to be a bug in either sip or package-notes-srpm-macros that causes this inclusion.

@MalcolmMielle
Copy link
Author

MalcolmMielle commented Mar 5, 2023

I have been trying to compile it using the version from pip in a venv but it doesn't work with:

CMake Warning at /home/malcolmmielle/rolling_ro2/install/python_qt_binding/share/python_qt_binding/cmake/sip_helper.cmake:25 (message):
  SIP binding generator NOT available.
Call Stack (most recent call first):
  src/qt_gui_cpp_sip/CMakeLists.txt:58 (include)


CMake Error at CMakeLists.txt:67 (message):
  No Python binding generator found.

Maybe because the sip version installed by pip is different? Just in case


@TK-Khaw solution didn't work for me and I hit other errors in the install. For now my solution is to ignore the package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants