Skip to content

Conversation

@jkloetzke
Copy link
Member

@sixtyfourktec This should fix compilation of x86_64 python extension modules...

The "build" package is becoming the main Python package build frontend.
As such, it should be in basement because it is part of the standard
Python build support.
This is the main class to use Python packages at build time. It is used
by all other Python infrastructure. Thus give it a common, short name.
Put all classes that handle the different types of Python build systems
into a common namespace. At the same time, split the setuptools and pip
methods from one another.

The python3::cext module is converted to a mixin class. Whether or not a
Python module has a C-extension is independent from the underlying build
system.
So far, the integrated distutils package will add the Python LIBDIR
unconditionally to the linker command line. This is bad because this
path points to some global path e.g., /usr/lib! It is even unnecessary
because the linker should find the python shared object anyway already.
@jkloetzke
Copy link
Member Author

@rhubert Could you have a look if this breaks anything on your side? You'll also have to use BobBuildTool/basement-gnu-linux#78. I know it creates some churn but I was uncomfortable with the classes already in the past and the pip update finally pushed it over the cliff for me...

@sixtyfourktec
Copy link
Contributor

I tried it and my problems are solved with the latest cl.

@rhubert
Copy link
Contributor

rhubert commented Mar 19, 2025

I tried to build with these changes but it fails with (dev-sandbox):

[End      5] BUILD     devel::automake - dev/build/devel/automake/2/workspace                                        
[ERR      5] configure: error: Autoconf 2.65 or better is required.                                                  
[ERR      5]     Please make sure it is installed and in your PATH.                                                  
[ERR      5] Step failed with return status 1; Command: $1/configure --prefix="/usr" --sysconfdir="/etc" --localstate
dir="/var" --libdir=/usr/lib "${@:2}"                                                                                
[ERR      5] Call stack (most recent call first)                                                                     
[ERR      5]     #0: Class  autotools-noarch, layer basement, line 40, in autotoolsNoarchBuild                       
[ERR      5]     #1: Recipe devel::automake, layer basement, line 2, in main                                         
====== 0/30 jobs running, 71% (208/289 tasks) done                                                                   
                                                                                                                     
Build error: ./dev/build/devel/automake/2/build.sh returned with 1                                                   
Failed package: my_root/devel::sandbox/devel::autotools/devel::automake
bash-5.2$ autoconf
Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module) (@INC entries
 checked: /usr/share/autoconf /usr/lib/perl5/site_perl/5.38.2/x86_64-linux /usr/lib/perl5/site_perl/5.38.2 /usr/lib/p
erl5/5.38.2/x86_64-linux /usr/lib/perl5/5.38.2) at /home/ralf/foo/dev/dist/devel/autoconf/2/workspace/usr/bin/autoco
nf line 41.                                                                                                          
BEGIN failed--compilation aborted at /home/ralf/foo/dev/dist/devel/autoconf/2/workspace/usr/bin/autoconf line 41.

I don't see how this relates to each other but it worked before... 🤔

@jkloetzke
Copy link
Member Author

This looks indeed unrelated. I made a clean build and it did not show the error.

My strong suspicious is that the relevant patch (recipes/devel/autoconf/0002-relocatable-autoconf.patch) has not been applied. The line number (41) looks like the unpatched file and the include path also lacks the relative directory.

I checked again the patch class but could not see how we can end up with such a situation. Any chance you still know what steps lead to the error?

@jkloetzke jkloetzke merged commit 8482cdc into BobBuildTool:master Mar 19, 2025
2 checks passed
@jkloetzke jkloetzke deleted the update-python branch March 19, 2025 19:31
@rhubert
Copy link
Contributor

rhubert commented Mar 20, 2025

My strong suspicious is that the relevant patch (recipes/devel/autoconf/0002-relocatable-autoconf.patch) has not been applied. The line number (41) looks like the unpatched file and the include path also lacks the relative directory.

Thanks, that's indeed the case. But I've no Idea what happened. The log is:

### START: Mon Jan 20 09:45:42 2025                                                                                  
checking file build-aux/git-version-gen                 
patching file build-aux/git-version-gen                                                                              
checking file bin/autoconf.in 
checking file bin/autoheader.in                                                                                      
checking file bin/autom4te.in              
checking file bin/autoreconf.in                                                                                      
checking file bin/autoscan.in              
checking file bin/autoupdate.in            
checking file bin/ifnames.in                              
checking file lib/autom4te.in              
patching file bin/autoconf.in                                                                                        
patching file bin/autoheader.in                                                                                      
patching file bin/autom4te.in                                                                                        
patching file bin/autoreconf.in       
patching file bin/autoscan.in                                                                                        
patching file bin/autoupdate.in            
patching file bin/ifnames.in                                                                                         
patching file lib/autom4te.in              
checking file build-aux/config.sub         
patching file build-aux/config.sub         
### END(0): Mon Jan 20 09:45:47 2025       
### START: Tue Mar 18 07:01:18 2025                                                                                  
### END(0): Tue Mar 18 07:01:18 2025
### START: Tue Mar 18 07:01:19 2025
### END(0): Tue Mar 18 07:01:19 2025

The last two builds are very close to each other. I can't remember what I did two days ago. 1s seams to be even to short for interrupting + restart. Maybe some bob-cmd.log would help. 🤔

stat autoconf-2.72.tar.xz
  File: autoconf-2.72.tar.xz
  Size: 1389680         Blocks: 2720       IO Block: 4096   regular file
Device: 254,1   Inode: 1094076     Links: 1
Access: (0600/-rw-------)  Uid: ( 1002/    ralf)   Gid: ( 1002/    ralf)
Access: 2025-03-18 07:01:18.675852438 +0100
Modify: 2025-01-20 09:45:47.694500354 +0100
Change: 2025-01-20 09:45:47.694500354 +0100
 Birth: 2025-01-20 09:45:43.030411949 +0100

stat autoconf-2.72.tar.xz.extracted 
  File: autoconf-2.72.tar.xz.extracted                                                                               
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: 254,1   Inode: 1097906     Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1002/    ralf)   Gid: ( 1002/    ralf)
Access: 2025-01-20 09:45:47.910504449 +0100                                                                          
Modify: 2025-01-20 09:45:47.806502477 +0100                                                                          
Change: 2025-01-20 09:45:47.806502477 +0100                                                                          
 Birth: 2025-01-20 09:45:47.806502477 +0100 
stat bin/autoconf.in 
  File: bin/autoconf.in
  Size: 6648            Blocks: 16         IO Block: 4096   regular file
Device: 254,1   Inode: 1093993     Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1002/    ralf)   Gid: ( 1002/    ralf)
Access: 2025-03-20 06:49:03.096593911 +0100
Modify: 2023-12-19 22:11:27.000000000 +0100
Change: 2025-03-18 07:01:18.719853279 +0100
 Birth: 2025-03-18 07:01:18.719853279 +0100

Anyway - now I got further up to ninja - which seams to need a update now:

+ python3 /home/ralf/foo/dev/src/devel/ninja/1/workspace/configure.py --bootstrap
Traceback (most recent call last):
  File "/home/ralf/foo/dev/src/devel/ninja/1/workspace/configure.py", line 26, in <module>   
    import pipes                                                                                                     
ModuleNotFoundError: No module named 'pipes'
++ bob_handle_error 1
++ set +x                                                                                                            
Step failed with return status 1; Command: python3 "$1/configure.py" --bootstrap
Call stack (most recent call first)
    #0: Recipe devel::ninja-bootstrap, layer basement, line 1, in main

https://docs.python.org/3/library/pipes.html

@jkloetzke
Copy link
Member Author

The archive was indeed extracted again. Bummer. 🤯

I've added b0a61100e2ca392956498652212744d1e3155314. Even though it is highly unlikely, the floating point comparison is not nice. Let's hope it was a one-off freak event... 😉

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