Skip to content

Conversation

@roddyrap
Copy link
Collaborator

No description provided.

This is helpful to manually run in the docker and then regenerate
configure files for the different submodules.

It's not used automatically.
I assume some of the depended modules' internal imports changed.
Copy link
Owner

@guyush1 guyush1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! looking forward to merge this, just have a look over my comments :P

pkg-config \
python3.12 \
python3-pip \
software-properties-common \
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you keep the list alphabetically ordered (also need to move libtool as well haha)


# Having a python-config file is an indication that we successfully built python.
if [[ -f "$python_lib_dir/python-config" ]]; then
if [[ -f "$python_lib_dir/python-config" && -f "$python_lib_dir/libpython3.14.a" ]]; then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try to make it generic by fetching the python version via python --version or which pythonX (might need to create a symlink so that it's name won't change each time we change a version, but you get the gist)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EDIT - even a global variable exported in the dockerfile is more then fine by me :)

export MODULE_BUILDTYPE="static"
export CONFIG_SITE="$python_dir/config.site-static"
>&2 CFLAGS="-static" LDFLAGS="-static" ../configure \
>&2 CFLAGS="${CFLAGS} -static" LDFLAGS="${LDFLAGS} -static -llzma" ../configure \
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOL good catch

--build=x86_64-pc-linux-gnu \
--host=$HOST \
--with-build-python=/usr/bin/python3.12 \
--with-build-python=/usr/bin/python3.14 \
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as before about making it generic

# Regenerate frozen modules with gdb env varaible. Do it after the configure because we need
# the `regen-frozen` makefile.
>&2 python3.12 ../Tools/build/freeze_modules.py
>&2 python3.14 ../Tools/build/freeze_modules.py
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not see anyone using this specific script.
I remember we talked (quiet a while ago) about not having the latest autoconf available giving you issues with issue #63
Is this script related to that?

Anyhow, please document the purpose of this script :)


# Example: "2.10"
AUTOCONF_VERSION="${1}"
if [ -z "${AUTOCONF_VERSION}" ]; then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if [ -z "${AUTOCONF_VERSION}" ]; then
if [[ -z "${AUTOCONF_VERSION}" ]]; then

@@ -1,4 +1,8 @@
_aix_support
_colorize
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you tag the needed modules for GEF via a comment - i don't want them getting removed accidentally in the future (thank you for not remembering it :) )

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good 💯

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EDIT: btw, since you added expat, we can add ncurses as well, no? we already support it in gdb static just like expat

@guyush1
Copy link
Owner

guyush1 commented Nov 14, 2025

@roddyrap when trying to use GEF.py with an ARM build, i got the following error:
Error occurred in Python: No module named '_ctypes'
does not replicate in an x86 build.

In fact, here is an easier replication of the bug:

gdb> python
import _ctypes
CTRL+D

There should be an error in a non-x86 build (or at the very least in arm).

could you look at that?

@guyush1
Copy link
Owner

guyush1 commented Nov 14, 2025

NOTE: this MR closes #39

@roddyrap
Copy link
Collaborator Author

@roddyrap when trying to use GEF.py with an ARM build, i got the following error:
Error occurred in Python: No module named '_ctypes'
does not replicate in an x86 build.

In fact, here is an easier replication of the bug:

gdb> python
import _ctypes
CTRL+D

There should be an error in a non-x86 build (or at the very least in arm).

could you look at that?

Ah yikes, yeah I'll check it out

@guyush1
Copy link
Owner

guyush1 commented Nov 22, 2025

@roddyrap any updates on this?

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

Successfully merging this pull request may close these issues.

3 participants