kisslinux / kiss

KISS Linux - Package Manager
https://kisslinux.github.io
MIT License
464 stars 62 forks source link

Kiss handling package builds differently after version 5.4.11 #258

Closed mmatongo closed 3 years ago

mmatongo commented 3 years ago

Description

Something changed about how KISS manages package builds prior to the kiss-community release version 5.4.2 and the official kisslinux release 5.4.11. The change breaks how some package Makefiles are handled resulting in failed builds.

Error message

install: can't create '../../bin/R': Path does not exist
make[2]: *** [Makefile:35: R] Error 1
make[2]: Leaving directory '/home/dm/.cache/kiss/proc/11325/build/r-lang/src/scripts'
make[1]: *** [Makefile:28: R] Error 1
make[1]: Leaving directory '/home/dm/.cache/kiss/proc/11325/build/r-lang/src'
make: *** [Makefile:61: R] Error 1
-> r-lang Build failed

Verbose log

  1. Download https://github.com/kisslinux/kiss/raw/master/kiss
  2. Run env KISS_PROMPT=0 sh -x ./kiss <arguments> > log 2>&1
  3. Upload the contents of log.

http://0x0.st/-J9C.txt - Log obtained using current master. http://0x0.st/-JpN.txt - Log obtained using kisslinux ver 5.4.11 http://0x0.st/-JpK.txt - Log obtained using kiss-community ver 5.4.2

dylanaraps commented 3 years ago

Try removing this block of environment variables: https://github.com/kisslinux/kiss/blob/master/kiss#L994-L1001 (Or overwriting them in the build file or kiss invocation CC=gcc CXX=g++ kiss b).

I can see in the latest log that cc/c++ are used in place of gcc/g++ which might cause issues. I also looked at other distributions and some force -j1 for make install.

Edit: The only change to how build files are executed is the environment they are given. Something in the above list is causing the issue. We just need to figure out what and why.

dylanaraps commented 3 years ago

Even your succeeding builds have errors:

  Error in readRDS(f) : error reading from connection                             
  Calls: <Anonymous> -> readRDS                                                   
  Execution halted                                                                
  Error in readRDS(f) : error reading from connection                             
  Calls: <Anonymous> -> readRDS                                                   
  Execution halted                                                                
  make[1]: *** [Makefile:62: html/NEWS.html] Error 1                              
  make[1]: *** Waiting for unfinished jobs....                                    
  make[1]: *** [Makefile:59: NEWS] Error 1                                        
dylanaraps commented 3 years ago

A log file with V=1 added to all make might be helpful (should show us the full failing commands).

mmatongo commented 3 years ago

Try removing this block of environment variables: https://github.com/kisslinux/kiss/blob/master/kiss#L994-L1001 (Or overwriting them in the build file or kiss invocation CC=gcc CXX=g++ kiss b).

I'm trying this right now and it seems to be going just fine.

Edit: The only change to how build files are executed is the environment they are given. Something in the above list is causing the issue. We just need to figure out what and why.

Like you suspected it seems like it was one of the environment variables causing the issue. After removing them, this is the new log. https://0x0.st/-JyT.txt

mmatongo commented 3 years ago

Even your succeeding builds have errors:

  Error in readRDS(f) : error reading from connection                             
  Calls: <Anonymous> -> readRDS                                                   
  Execution halted                                                                
  Error in readRDS(f) : error reading from connection                             
  Calls: <Anonymous> -> readRDS                                                   
  Execution halted                                                                
  make[1]: *** [Makefile:62: html/NEWS.html] Error 1                              
  make[1]: *** Waiting for unfinished jobs....                                    
  make[1]: *** [Makefile:59: NEWS] Error 1                                        

These are the documentation files if I'm correct, it seems I wasn't disabling them and they still try to build either way. This is non-fatal though.

dylanaraps commented 3 years ago

Now it's just a matter of figuring out which variables cause the issue. Then we can look into why they cause the build system to fail.

mmatongo commented 3 years ago

A log file with V=1 added to all make might be helpful (should show us the full failing commands).

This log file is with the env variables untouched and V=1 - http://0x0.st/-JyA.txt

mmatongo commented 3 years ago

Now it's just a matter of figuring out which variables cause the issue. Then we can look into why they cause the build system to fail.

I'll run a few builds adding and removing variables and hopefully that'll turn something up

mmatongo commented 3 years ago

I removing line 999 https://github.com/kisslinux/kiss/blob/dfc2070d95033a1d0b94d2f8131c6d3961160684/kiss#L999 results in a successful build. This is the resulting log - https://0x0.st/-Jye.txt

dylanaraps commented 3 years ago

Similar issue: https://github.com/kisslinux/kiss/issues/237

dylanaraps commented 3 years ago

Now we just need to figure out why setting DESTDIR causes the build system to choke.

dylanaraps commented 3 years ago

I see the issue:

mkdir /home/dm/.cache/kiss/proc/15300/pkg/r-lang..
mkdir /home/dm/.cache/kiss/proc/15300/pkg/r-lang../../bin

The mkdir calls have DESTDIR prepended.

They should be:

mkdir ..
mkdir ../../bin
dylanaraps commented 3 years ago

The build system assumes that DESTDIR is only set during the install phase (which is an incorrect assumption to make). You should be able to workaround this by changing make to make DESTDIR="" in the build file. I recommend also opening an issue upstream about this.

mmatongo commented 3 years ago

The build system assumes that DESTDIR is only set during the install phase (which is an incorrect assumption to make). You should be able to workaround this by changing make to make DESTDIR="" in the build file. I recommend also opening an issue upstream about this.

This works, eerily. It doesn't prepend the DESTDIR when mkdir is called and builds as expected. I'll open an upstream issue.

This is the updated log with the addition of DESTDIR="" to the first make call. https://0x0.st/-JyO.txt

dylanaraps commented 3 years ago

Yup. It uses DESTDIR when creating directories but expects it to be unset at the same time...

Closing this issue as it's related to R's build system and not the package manager (just made visible by the package manager).

Thanks for your help.