Author Topic: depcreate abiword: lot of files not found followed by segmentation error  (Read 7446 times)

dufresnep

  • Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
I did sudo update ports -u, then added the collection dir files to /etc/cards.conf:
dir /usr/ports/base
dir /usr/ports/cli
dir /usr/ports/cli-extra
dir /usr/ports/desktops
dir /usr/ports/gui
dir /usr/ports/gui-extra

now, I have tried to:
cards depcreate abiword:
...
/var/lib/pkg/depot/base/pkg-config/Pkgfile Not found ..
/var/lib/pkg/depot/base/sudo/Pkgfile Not found ..
/var/lib/pkg/depot/base/bc/Pkgfile Not found ..
/var/lib/pkg/depot/base/automake/Pkgfile Not found ..
/var/lib/pkg/depot/base/efibootmgr/Pkgfile Not found ..
/var/lib/pkg/depot/base/perl/Pkgfile Not found ..
/var/lib/pkg/depot/base/pam/Pkgfile Not found ..
/var/lib/pkg/depot/base/gperf/Pkgfile Not found ..
/var/lib/pkg/depot/base/acl/Pkgfile Not found ..
/var/lib/pkg/depot/base/lsb-release/Pkgfile Not found ..
/var/lib/pkg/depot/base/git/Pkgfile Not found ..
/var/lib/pkg/depot/base/gcc/Pkgfile Not found ..
/var/lib/pkg/depot/base/efivar/Pkgfile Not found ..
/var/lib/pkg/depot/base/make/Pkgfile Not found ..
/var/lib/pkg/depot/base/xz/Pkgfile Not found ..
/var/lib/pkg/depot/base/ncurses/Pkgfile Not found ..
/var/lib/pkg/depot/base/mpfr/Pkgfile Not found ..
/var/lib/pkg/depot/base/libpng/Pkgfile Not found ..
/var/lib/pkg/depot/base/tar/Pkgfile Not found ..
/var/lib/pkg/depot/base/man-db/Pkgfile Not found ..
/var/lib/pkg/depot/base/sysklogd/Pkgfile Not found ..
/var/lib/pkg/depot/base/openssl/Pkgfile Not found ..
/var/lib/pkg/depot/base/ntfs-3g/Pkgfile Not found ..
/var/lib/pkg/depot/base/m4/Pkgfile Not found ..
/var/lib/pkg/depot/base/lz4/Pkgfile Not found ..
Erreur de segmentation
paul [ /usr/ports/desktops ]$


Code: [Select]
paul [ /usr/ports/desktops ]$ ls /var/lib/pkg/depot/base
acl          bzip2            dosfstools  flex      gperf      jfsutils    libedit         lsb-release  mpfr     pciutils       sed       util-linux
attr         ca-certificates  e2fsprogs   freetype  gpm        kbd         libelf          lvm2         nasm     perl           shadow    wget
autoconf     cards            e3          gawk      grep       kernel      libffi          lz4          ncurses  pkg-config     squashfs  wireless-tools
automake     coreutils        efibootmgr  gcc       groff      kernel-lts  libnl           lzo          ntfs-3g  popt           sudo      wpa-supplicant
bash         cpio             efivar      gdbm      grub       kmod        libpipeline     m4           nutyx    procps-ng      sysklogd  xfsprogs
bc           curl             eudev       gettext   gzip       less        libpng          make         openssh  psmisc         sysvinit  xz
binutils     dhcpcd           expat       git       iana-etc   libaio      libtirpc        man-db       openssl  readline       tar       zlib
bison        dialog           file        glibc     inetutils  libarchive  libtool         mdadm        pam      reiserfsprogs  texinfo
btrfs-progs  diffutils        findutils   gmp       iproute2   libcap      linux-firmware  mpc          patch    rsync          tzdata
paul [ /usr/ports/desktops ]$

I guess my question is: What is going on?

Code: [Select]
from dmesg:
[98752.771130] cards[15915]: segfault at 18 ip 0000000000430720 sp 00007ffffdca4270 error 4 in cards[406000+71000]
[98752.771139] Code: 75 e0 c7 42 18 ff ff ff ff 8b 13 48 89 ef 89 50 10 eb 10 0f 1f 80 00 00 00 00 48 83 c7 08 49 39 fa 74 44 48 8b 07 48 8b 70 08 <8b> 46 18 85 c0 7e e9 8b 46 10 85 c0 74 e2 48 8b 16 44 8d 40 ff 48

Code: [Select]
# gdb --args cards depcreate abiword
run
Program received signal SIGSEGV, Segmentation fault.
0x0000000000430720 in ?? ()
(gdb) bt
#0  0x0000000000430720 in ?? ()
#1  0x000000000046c54a in ?? ()
#2  0x000000000046cbce in ?? ()
#3  0x00000000004124cc in ?? ()
#4  0x00007ffff75bfb6b in __libc_start_main () from /lib/libc.so.6
#5  0x0000000000412bba in ?? ()
(gdb) quit
A debugging session is active.

What can I install to have more symbols installed?
« Last Edit: Wed Oct 23 11:32:20 2019 by dufresnep »

Thierry

  • Administrator
  • Hero Member
  • *****
  • Posts: 706
  • Karma: +13/-0
  • Gender: Male
    • NuTyX distribution

dufresnep

  • Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
The link you just post was basically the text I was reading.
I fear your answer was to short for me to understand how it answer my question.

I adapted it to 11.2 version (because of the changes to the collections).
But indeed I added the:
base /usr/ports/base
logdir /var/log/pkgbuild

but there is no change.

I have rebuild cards from source, and on $ gdb --args cards depcreate abiword
I get:
Program received signal SIGSEGV, Segmentation fault.
0x00000000004306f1 in generate_level(itemList*, pkgList*, unsigned int*) ()
(gdb) bt
#0  0x00000000004306f1 in generate_level(itemList*, pkgList*, unsigned int*) ()
#1  0x000000000046c54a in CardsDepends::depends() ()
#2  0x000000000046cbce in CardsDepends::getNeededDependencies[abi:cxx11]() ()
#3  0x00000000004124cc in main ()
(gdb)

Thierry

  • Administrator
  • Hero Member
  • *****
  • Posts: 706
  • Karma: +13/-0
  • Gender: Male
    • NuTyX distribution
Thanks for tracking down this bug, I will fix that some time:

Nevertheless, I did a clean test here (very easy for me because it's a live system).
1. Install cards.devel
Code: [Select]
get cards.devel
2. sudo ports -u base
Code: [Select]
sudo ports -u base
sudo ports -u cli
sudo ports -u gui
sudo ports -u gui-extra

3. Set the /etc/cards.conf:
Code: [Select]
dir /usr/ports/gui-extra
dir /usr/ports/gui
dir /usr/ports/cli
dir /usr/ports/base
base /usr/ports/base

4. Checking with the command cards config:
Code: [Select]
cards config
1 Dossier:  /usr/ports/gui-extra
2 Dossier:  /usr/ports/gui
3 Dossier:  /usr/ports/cli
4 Dossier:  /usr/ports/base
Liste des dossiers pour le système de base: /usr/ports/base
Binaires : x86_64

5. Run the magic command cards depcreate
Code: [Select]
sudo cards depcreate abiword

Code: [Select]
create of libuv
cards create: /usr/ports/cli/libuv package(s)
=======> Comments are now ignored when building the package(s).
=======> PKGMK_INSTALL: no
=======> PKGMK_WORK_DIR: /usr/ports/cli/libuv/work
=======> PKGMK_SOURCE_DIR: /usr/ports/cli/libuv
=======> WARNING: CLEAN IGNORED
=======> PKGMK_IGNORE_REPO: yes
=======> PKGMK_IGNORE_FOOTPRINT: yes
=======> PKGMK_IGNORE_MD5SUM: yes
=======> .PKGREPO file will be deleted
=======> PKGMK_COMPRESS_PACKAGE: no
=======> name: libuv
=======> version: 1.30.1
=======> release: 1
=======> Downloading 'https://github.com/libuv/libuv/archive/v1.30.1/libuv-1.30.1.tar.gz'.
--2019-10-24 11:55:15--  https://github.com/libuv/libuv/archive/v1.30.1/libuv-1.30.1.tar.gz
Resolving github.com... 140.82.118.3
Connecting to github.com|140.82.118.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
...
....

and it goes

dufresnep

  • Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
Thanks! I will probably retry from live USB key.

Meanwhile, I have found that generate_level is part of: compile_dependencies_util.cxx

generate_level begins by: #ifndef NDEBUG

So I edited Makefile.inc:
#CXXFLAGS += -DNDEBUG -std=c++11
CXXFLAGS += -std=c++11
...
#CFLAGS += -DNDEBUG -std=gnu11
CFLAGS += -std=gnu11

but then: make all
Code: [Select]
compiling pkginst.cxx ...
pkginst.cxx: Dans la fonction membre « void Pkginst::generateDependencies() »:
pkginst.cxx:132:65: erreur: expected « ; » before « vrit »
  132 | cerr << "m_dependenciesList.push_back " << vrit->first << " " vrit->second << endl;
      |                                                              ^~~~~
      |                                                              ;
make[1]: *** [../Makefile.inc:74: pkginst.o] Error 1
make: *** [Makefile:34: all] Error 2

I fixed it by adding a << but then:
Code: [Select]
compiling cards_install.cxx ...
cards_install.cxx: Dans la fonction membre « void Cards_install::getLocalePackagesList() »:
cards_install.cxx:178:64: erreur: expected « ; » before « i »
  178 | or (auto i : m_dependenciesList ) std::cerr << i.first << " " i.second << std::endl;
      |                                                              ^~
      |                                                              ;
make: *** [../Makefile.inc:74: cards_install.o] Error 1
paul [ ~/cards-2.4.104/src ]$

So I added an other << and then make all finished.

Now the output of cards add a line:
Code: [Select]
/var/lib/pkg/depot/base/m4/Pkgfile Not found ..
/var/lib/pkg/depot/base/lz4/Pkgfile Not found ..
List des 1258 paquets
Erreur de segmentation
paul [ ~/cards/bin ]$
« Last Edit: Thu Oct 24 10:43:09 2019 by dufresnep »

Thierry

  • Administrator
  • Hero Member
  • *****
  • Posts: 706
  • Karma: +13/-0
  • Gender: Male
    • NuTyX distribution
Forgot to tell you what your mistake in the configuration Cards.conf file: You forgot to Change the directories where all the ports are located.

/var/lib/pkg/depot -> /usr/ports

Live System has nothing todo with this issue.

dufresnep

  • Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
Thanks!
It is now compiling...

hum... cmake is not happy:
Code: [Select]
-- Looking for a Fortran compiler
-- Looking for a Fortran compiler - /usr/bin/gfortran
CMake Error at /usr/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:27 (message):
  The imported target "Qt5::Core" references the file

     "/usr/include/qt/"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/usr/lib/cmake/Qt5Core/Qt5CoreConfig.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /usr/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:74 (_qt5_Core_check_file_exists)
  Tests/RunCMake/CMakeLists.txt:337 (find_package)


-- Configuring incomplete, errors occurred!
See also "/usr/ports/cli/cmake/work/src/cmake-3.15.4/CMakeFiles/CMakeOutput.log"

but it is going much farther.
« Last Edit: Thu Oct 24 11:10:22 2019 by dufresnep »

Thierry

  • Administrator
  • Hero Member
  • *****
  • Posts: 706
  • Karma: +13/-0
  • Gender: Male
    • NuTyX distribution
The "cards depcreate" command assume you have all the devel packages group installed as well for all the packages that you actualy have  installed. So the easiest way you add: "group devel" into your /etc/cards.conf file and then you do a "sudo cards upgrade". If you are not happy with this approach they are many others. But you will need to read more

- Scenario A, B, C, D or E

- And the ultimate weapon for the end: The Build-Bot
« Last Edit: Thu Oct 24 13:22:32 2019 by Thierry »

dufresnep

  • Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
Well... I did take a look to the scenarios... but I wanted to continue to do things 'the wrong way' a little bit more before doing the 'right thing'.

So I have now:
paul [ /usr/ports/cli/cyrus-sasl ]$ cards config
1 Dossier:  /usr/ports/gui-extra
2 Dossier:  /usr/ports/gui
3 Dossier:  /usr/ports/cli
4 Dossier:  /usr/ports/cli-extra
5 Dossier:  /usr/ports/base
6 Dossier:  /usr/ports/desktops
Liste des dossiers pour le système de base: /usr/ports/base
Binaires : x86_64
Group    : devel
Group    : man
Group    : fr
paul [ /usr/ports/cli/cyrus-sasl ]$

But I have this line that I had uncommented before:
#url http://downloads.nutyx.org

When trying to cards depcreate abiword, I was having the same missing Pkgfiles, and segmentation faults as before.

So I decided to go the cowboy way:
sudo cards base

And then, I had to get mate... firefox, etc.
I then realized that I also needed: mate-extra
But It seems that most of mate packages was not reinstalled by default.
e.g. I realized I was not having the window-manager for mate: marco , and get it manually.
So I begin to doubt that the new package set really works with get.

I finally seen that sudo depcreate abiword, when the #url http://downloads.nutyx.org line was uncommented, resulted in
it trying to 'install' one of the missing dependency, but says that the package does not exist.
So I made a cycle of get dependency, cards depcreate abiword, until I get to the latest one: abiword.
So the system was saying abiword does not exist... so I just continue and done the stupid thing: get abiword.
So at this step, I had the binary package of abiword installed, but not by compiling the port.

So I did: sudo remove abiword. Also commented back the #url http://downloads.nutyx.org line in /etc/cards.conf.
But then, sudo depcreate abiword was complaining some binary packages needed to be remove: abiword-devel... and an other like this, maybe abiword-fr... don't remember clearly.
I tried sudo cards purge I think, but did not seems to do any good.

So I ended to manually remove the .tar files in /usr/ports/gui-extra/abiword ... or was it the work directory in that directory... anyway that fixed it.

Still unsure, but to me it seems cards remove just remove the main package, not the sub-packages... as I was expecting.

So that finally, sudo depcreate abiword worked!

I tried other: sudo depcreate ocaml (strange it is in gui-extra).
paul [ /usr/ports/gui-extra/ocaml ]$ ocaml -version
The OCaml toplevel, version 4.06.0
paul [ /usr/ports/gui-extra/ocaml ]$
btw, 4.09 is the current version.

Then tried cards depcreate qemu:
paul [ /usr/ports/gui-extra/ocaml ]$ sudo cards depcreate qemu
create of cyrus-sasl
cards create: /usr/ports/cli/cyrus-sasl package(s)
...
=======> Downloading 'ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-2.1.27.tar.gz'.
=======> Partial download found, trying to resume
--2019-10-24 20:38:50--  ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-2.1.27.tar.gz
           => '/usr/ports/cli/cyrus-sasl/cyrus-sasl-2.1.27.tar.gz.partial'
Resolving ftp.cyrusimap.org... 128.2.12.202
Connecting to ftp.cyrusimap.org|128.2.12.202|:21...

Never was able to finish the download.
Could it be build from: https://github.com/cyrusimap/cyrus-sasl ?
« Last Edit: Fri Oct 25 00:42:15 2019 by dufresnep »