LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Error compiling fwupd from slackbuilds (https://www.linuxquestions.org/questions/slackware-14/error-compiling-fwupd-from-slackbuilds-4175719632/)

camerabambai 12-11-2022 06:33 AM

Quote:

Originally Posted by lancsuk (Post 6397190)
It works for me....I was able to build fwupd and flatpak

Code:

--- libarchive.SlackBuild.orig        2021-08-24 07:27:01.000000000 +0100
+++ libarchive.SlackBuild        2022-12-11 07:37:05.288000000 +0000
@@ -72,6 +72,11 @@
 rm -rf $PKGNAM-$VERSION
 tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
 cd $PKGNAM-$VERSION || exit 1
+zcat $CWD/1813.patch.gz | patch -p1 || exit
+aclocal
+libtoolize --force
+autoreconf
+automake --add-missing
 chown -R root:root .
 find . \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \


for me don't work.
Consider I'm on Slackware 15.0

p.s what is 1813.patch? I cannot found on slackware sources

marav 12-11-2022 06:37 AM

Quote:

Originally Posted by camerabambai (Post 6397216)
for me don't work.
Consider I'm on Slackware 15.0

p.s what is 1813.patch? I cannot found on slackware sources

It's the patch related to the pull request #1813:

https://patch-diff.githubusercontent...ull/1813.patch

camerabambai 12-11-2022 06:39 AM

Quote:

Originally Posted by jloco (Post 6397214)
Simple fix/hack as root:

open "/usr/lib64/pkgconfig/libarchive.pc"

on the last line "Requires.private:" remove "iconv", save file... move on.

Proper fix needs to be worked out upstream, but rather than re-building Slackware packages, that enables you to do whatever building you need. Nothing I've built has ended up broken locally afterwards, but take my uneducated advice with a grain of salt.

This works, thanks

kjhambrick 12-11-2022 09:23 AM

Quote:

Originally Posted by jloco (Post 6397214)
Simple fix/hack as root:

open "/usr/lib64/pkgconfig/libarchive.pc"

on the last line "Requires.private:" remove "iconv", save file... move on.

Proper fix needs to be worked out upstream, but rather than re-building Slackware packages, that enables you to do whatever building you need. Nothing I've built has ended up broken locally afterwards, but take my uneducated advice with a grain of salt.

jloco --

This worked for me as well but the fwupd-1.7.10-x86_64-1_SBo.tgz package is quite different now compared to before the libarchive update.

As I posted above, the fwupd.SlackBuild failed for me too.

Removing iconv from /usr/lib64/pkgconfig/libarchive.pc and running fwupd.SlackBuild did not fail.

However, there are 186 fewer or changed files now compared to the same fwupd SlackBuild before the libarchive update.

If anyone cares, I've got a Unified Diff on the fwupd Package Files before and after.

Paraphrasing your warning: Buyer Beware :)

Not a member of the Slackware Team but I imagine Pat and the Team will apply proper fixes to libarchive as soon as possible.

HTH.

-- kjh

Code:

# head -1 fwupd.SlackBuild-1.7.10.log && tail -4 fwupd.SlackBuild-1.7.10.log
fwupd.SlackBuild startup  at Sun Dec 11 09:01:17 CST 2022

Slackware package /tmp/fwupd-1.7.10-x86_64-1_SBo.tgz created.

fwupd.SlackBuild complete at Sun Dec 11 09:01:46 CST 2022 ... RetCode = 0

# these are the fwupd packages on my System( I keep the current and previous handy in case I need to revert )

# ls -lad ../pkg/*
-rw-r--r-- 1 root root 1249122 Jul 10 08:07 ../pkg/fwupd-1.3.12-x86_64-1_SBo.tgz
-rw-r--r-- 1 root root 7318668 Oct 15 05:31 ../pkg/fwupd-1.7.10-x86_64-1_SBo.tgz                    # built before libarchive update
-rw-r--r-- 1 root root 7124453 Dec 11 09:01 ../pkg/fwupd-1.7.10-x86_64-1_SBo.tgz-without-iconv.tgz  # built just now with edited pkgconfig


marav 12-12-2022 09:56 AM

FYI

Archlinux have dropped iconv from .pc file

https://github.com/archlinux/svntogi...b5362b3c8c1204

kjhambrick 12-19-2022 09:48 AM

All --

For the record, yesterday's libarchive update for Slackware 15.0 fixed the iconv issue when executing fwupd.SlackBuild.

Thanks to Pat and the Team !

-- kjh
Code:

Sun Dec 18 20:28:03 UTC 2022
patches/packages/libarchive-3.6.2-x86_64-2_slack15.0.txz: Rebuilt.
      This update fixes a regression causing a failure to compile against
      libarchive: don't include iconv in libarchive.pc.
+--------------------------+


marav 12-19-2022 10:24 AM

Quote:

Originally Posted by kjhambrick (Post 6398921)

Thanks to Pat and the Team !

and @jloco

kjhambrick 12-19-2022 10:30 AM

EDIT: USER ERROR -- I messed with the meson options in fwupd.SlackBuild last week and did not restore the original SlackBuild

Shucks ...

fwupd compiles but fwupdtool does not run.

Maybe I did it wrong ?

I don't see libjcat in the Official Slackware 15.0 MANIFEST nor at SlackBuilds.org but I did find libjcat at https://github.com/hughsie/libjcat

Digging a little deeper ...

-- kjh

Code:

# fwupdtool --help
fwupdtool: error while loading shared libraries: libjcat.so.1: cannot open shared object file: No such file or directory


drumz 12-19-2022 11:01 AM

Quote:

Originally Posted by kjhambrick (Post 6398933)
Shucks ...

fwupd compiles but fwupdtool does not run.

Maybe I did it wrong ?

I don't see libjcat in the Official Slackware 15.0 MANIFEST nor at SlackBuilds.org but I did find libjcat at https://github.com/hughsie/libjcat

Digging a little deeper ...

-- kjh

Code:

# fwupdtool --help
fwupdtool: error while loading shared libraries: libjcat.so.1: cannot open shared object file: No such file or directory


I haven't tried running fwupdtool but:

Code:

# grep libjcat.so /var/lib/pkgtools/packages/*
/var/lib/pkgtools/packages/fwupd-1.7.10-x86_64-2_SBo:usr/lib64/libjcat.so.1.0.0
# grep libjcat.so /var/lib/pkgtools/scripts/*
/var/lib/pkgtools/scripts/fwupd-1.7.10-x86_64-2_SBo:( cd usr/lib64 ; rm -rf libjcat.so )
/var/lib/pkgtools/scripts/fwupd-1.7.10-x86_64-2_SBo:( cd usr/lib64 ; ln -sf libjcat.so.1 libjcat.so )
/var/lib/pkgtools/scripts/fwupd-1.7.10-x86_64-2_SBo:( cd usr/lib64 ; rm -rf libjcat.so.1 )
/var/lib/pkgtools/scripts/fwupd-1.7.10-x86_64-2_SBo:( cd usr/lib64 ; ln -sf libjcat.so.1.0.0 libjcat.so.1 )


drumz 12-19-2022 11:03 AM

Ok, I tried running it and it works:

Code:

# fwupdtool --help
Usage:
  fwupdtool [OPTION…]

  activate [DEVICE-ID|GUID]        Activate pending devices
  attach DEVICE-ID|GUID            Attach to firmware mode
  bind-driver SUBSYSTEM DRIVER [DEVICE-ID|GUID]
                                    Bind new kernel driver
  build-firmware FILE-IN FILE-OUT [SCRIPT] [OUTPUT]
                                    Build firmware using a sandbox
  clear-history                    Erase all firmware update history
  detach DEVICE-ID|GUID            Detach to bootloader mode
  esp-list                          Lists files on the ESP
  esp-mount                        Mounts the ESP
  esp-unmount                      Unmounts the ESP
  export-hwids HWIDS-FILE          Save a file that allows generation of hardware IDs
  firmware-build BUILDER-XML FILENAME-DST
                                    Build a firmware file
  firmware-convert FILENAME-SRC FILENAME-DST [FIRMWARE-TYPE-SRC] [FIRMWARE-TYPE-DST]
                                    Convert a firmware file
  firmware-dump FILENAME [DEVICE-ID|GUID]
                                    Read a firmware blob from a device
  firmware-export FILENAME [FIRMWARE-TYPE]
                                    Export a firmware file structure to XML
  firmware-extract FILENAME [FIRMWARE-TYPE]
                                    Extract a firmware blob to images
  firmware-parse FILENAME [FIRMWARE-TYPE]
                                    Parse and show details about a firmware file
  firmware-patch FILENAME OFFSET DATA [FIRMWARE-TYPE]
                                    Patch a firmware blob at a known offset
  firmware-sign FILENAME CERTIFICATE PRIVATE-KEY
                                    Sign a firmware with a new key
  get-details FILE                  Gets details about a firmware file
  get-device-flags                  Get all device flags supported by fwupd
  get-devices                      Get all devices that support firmware updates
  get-firmware-types                List the available firmware types
  get-history                      Show history of firmware updates
  get-plugins                      Get all enabled plugins registered with the system
  get-remotes                      Gets the configured remotes
  get-topology                      Alias to get-devices
  get-updates [DEVICE-ID|GUID]      Gets the list of updates for connected hardware
  get-upgrades [DEVICE-ID|GUID]    Alias to get-updates
  hwids [SMBIOS-FILE|HWIDS-FILE]    Return all the hardware IDs for the machine
  install FILE [DEVICE-ID|GUID]    Install a firmware file on this hardware
  install-blob FILENAME DEVICE-ID  Install a firmware blob on a device
  monitor                          Monitor the daemon for events
  refresh                          Refresh metadata from remote server
  reinstall DEVICE-ID|GUID          Reinstall firmware on a device
  security                          Gets the host security attributes
  self-sign TEXT                    Sign data using the client certificate
  smbios-dump FILE                  Dump SMBIOS data from a file
  switch-branch [DEVICE-ID|GUID] [BRANCH]
                                    Switch the firmware branch on the device
  unbind-driver [DEVICE-ID|GUID]    Unbind current driver
  update [DEVICE-ID|GUID]          Updates all specified devices to latest firmware version, or all devices if unspecified
  upgrade [DEVICE-ID|GUID]          Alias to update
  verify-update [DEVICE-ID|GUID]    Update the stored metadata with current contents
  watch                            Watch for hardware changes

Help Options:
  -h, --help                      Show help options
  --help-all                      Show all help options

Application Options:
  --version                        Show client and daemon versions
  --allow-reinstall                Allow reinstalling existing firmware versions
  --allow-older                    Allow downgrading firmware versions
  --allow-branch-switch            Allow switching firmware branch
  --force                          Force the action by relaxing some runtime checks
  --ignore-checksum                Ignore firmware checksum failures
  --ignore-vid-pid                Ignore firmware hardware mismatch failures
  --no-reboot-check                Do not check or prompt for reboot after update
  --no-safety-check                Do not perform device safety checks
  --no-device-prompt              Do not prompt for devices
  --show-all                      Show all results
  --plugins                        Manually enable specific plugins
  --prepare                        Run the plugin composite prepare routine when using install-blob
  --cleanup                        Run the plugin composite cleanup routine when using install-blob
  --enable-json-state              Save device state into a JSON file between executions
  --disable-ssl-strict            Ignore SSL strict checks when downloading files
  --filter                        Filter with a set of device flags using a ~ prefix to exclude, e.g. 'internal,~needs-reboot'
  --json                          Output in JSON format
  -v, --verbose                    Show debugging information for all domains
  --no-timestamp                  Do not include timestamp prefix
  --no-domain                      Do not include log domain prefix
  --plugin-verbose=PLUGIN-NAME    Show plugin verbose information
  --daemon-verbose=DOMAIN          Show daemon verbose information for a particular domain

This tool allows an administrator to use the fwupd plugins without being installed on the host system.

But I compiled and installed this package about a month ago (Slackware64-15.0) (before the libarchive fiasco):

Code:

# ls -l /var/lib/pkgtools/packages/fwupd-1.7.10-x86_64-2_SBo
-rw-r--r-- 1 root root 150138 Nov 14 15:12 /var/lib/pkgtools/packages/fwupd-1.7.10-x86_64-2_SBo


kjhambrick 12-19-2022 11:13 AM

EDIT: USER ERROR -- I messed with the meson options in fwupd.SlackBuild last week and did not restore the original SlackBuild

Thanks drumz.

Yes, the copy of fwupd-1.7.10-x86_64-1_SBo.tgz-old-libarchive.tgz that I build before the libarchive update includes libjcat so and include files but this morning's Package built with the new libarchive does not.

-- kjh

This is the Package created with the old libarchive.

Code:

# tar -tvf fwupd-1.7.10-x86_64-1_SBo.tgz-old-libarchive.tgz |grep libjcat

drwxr-xr-x root/root        0 2022-10-15 05:31 usr/include/libjcat-1/
-rw-r--r-- root/root      441 2022-10-15 05:31 usr/include/libjcat-1/jcat.h
drwxr-xr-x root/root        0 2022-10-15 05:31 usr/include/libjcat-1/libjcat/
-rw-r--r-- root/root      2312 2022-10-15 05:31 usr/include/libjcat-1/libjcat/jcat-blob.h
-rw-r--r-- root/root      1641 2022-10-15 05:31 usr/include/libjcat-1/libjcat/jcat-common.h
-rw-r--r-- root/root      1132 2022-10-15 05:31 usr/include/libjcat-1/libjcat/jcat-context.h
-rw-r--r-- root/root      1811 2022-10-15 05:31 usr/include/libjcat-1/libjcat/jcat-engine.h
-rw-r--r-- root/root      1648 2022-10-15 05:31 usr/include/libjcat-1/libjcat/jcat-file.h
-rw-r--r-- root/root      864 2022-10-15 05:31 usr/include/libjcat-1/libjcat/jcat-item.h
-rw-r--r-- root/root      544 2022-10-15 05:31 usr/include/libjcat-1/libjcat/jcat-result.h
-rw-r--r-- root/root      1157 2022-10-15 05:31 usr/include/libjcat-1/libjcat/jcat-version.h
-rwxr-xr-x root/root    79680 2022-10-15 05:31 usr/lib64/libjcat.so.1.0.0
drwxr-xr-x root/root        0 2022-10-15 05:31 usr/libexec/installed-tests/libjcat/
drwxr-xr-x root/root        0 2022-10-15 05:31 usr/libexec/installed-tests/libjcat/colorhug/
-rw-r--r-- root/root      8000 2022-10-15 05:31 usr/libexec/installed-tests/libjcat/colorhug/firmware.bin
-rw-r--r-- root/root      473 2022-10-15 05:31 usr/libexec/installed-tests/libjcat/colorhug/firmware.bin.asc
-rw-r--r-- root/root      2261 2022-10-15 05:31 usr/libexec/installed-tests/libjcat/colorhug/firmware.bin.p7b
-rw-r--r-- root/root      2350 2022-10-15 05:31 usr/libexec/installed-tests/libjcat/colorhug/firmware.bin.p7c
-rwxr-xr-x root/root    104336 2022-10-15 05:31 usr/libexec/installed-tests/libjcat/jcat-self-test
drwxr-xr-x root/root        0 2022-10-15 05:31 usr/libexec/installed-tests/libjcat/pki/
-rw-r--r-- root/root      959 2022-10-15 05:31 usr/libexec/installed-tests/libjcat/pki/GPG-KEY-Linux-Vendor-Firmware-Service
-rw-r--r-- root/root      1679 2022-10-15 05:31 usr/libexec/installed-tests/libjcat/pki/LVFS-CA.pem

This is this morning's package created with the new libarchive:

Code:

# tar -tvf fwupd-1.7.10-x86_64-1_SBo.tgz |grep libjcat

<<no output>>


marav 12-19-2022 11:20 AM

Quote:

Originally Posted by kjhambrick (Post 6398933)
Shucks ...

fwupd compiles but fwupdtool does not run.

Maybe I did it wrong ?

I don't see libjcat in the Official Slackware 15.0 MANIFEST nor at SlackBuilds.org but I did find libjcat at https://github.com/hughsie/libjcat

Digging a little deeper ...

-- kjh

Code:

# fwupdtool --help
fwupdtool: error while loading shared libraries: libjcat.so.1: cannot open shared object file: No such file or directory


Indeed, it seems that libjcat is a required dependency
But from what I see, it's build-in:
Code:

...
fwupd-1.7.10/subprojects/libjcat.wrap
...

Code:

# fwupdtool --version
compile  org.freedesktop.fwupd        1.7.10
runtime  org.freedesktop.gusb          0.4.2
runtime  org.kernel                    6.1.0
compile  org.freedesktop.gusb          0.4.2
compile  com.hughsie.libjcat          0.1.9
runtime  org.freedesktop.fwupd        1.7.10

Code:

tar -tvf /tmp/fwupd-1.7.10-x86_64-1_SBo.tgz| grep libjcat
drwxr-xr-x root/root        0 2022-12-19 17:58 usr/include/libjcat-1/
-rw-r--r-- root/root      441 2022-12-19 17:57 usr/include/libjcat-1/jcat.h
drwxr-xr-x root/root        0 2022-12-19 17:58 usr/include/libjcat-1/libjcat/
-rw-r--r-- root/root      2312 2022-12-19 17:57 usr/include/libjcat-1/libjcat/jcat-blob.h
-rw-r--r-- root/root      1641 2022-12-19 17:57 usr/include/libjcat-1/libjcat/jcat-common.h
-rw-r--r-- root/root      1132 2022-12-19 17:57 usr/include/libjcat-1/libjcat/jcat-context.h
-rw-r--r-- root/root      1811 2022-12-19 17:57 usr/include/libjcat-1/libjcat/jcat-engine.h
-rw-r--r-- root/root      1648 2022-12-19 17:57 usr/include/libjcat-1/libjcat/jcat-file.h
-rw-r--r-- root/root      864 2022-12-19 17:57 usr/include/libjcat-1/libjcat/jcat-item.h
-rw-r--r-- root/root      544 2022-12-19 17:57 usr/include/libjcat-1/libjcat/jcat-result.h
-rw-r--r-- root/root      1157 2022-12-19 17:57 usr/include/libjcat-1/libjcat/jcat-version.h
-rwxr-xr-x root/root    83920 2022-12-19 17:58 usr/lib64/libjcat.so.1.0.0
drwxr-xr-x root/root        0 2022-12-19 17:58 usr/libexec/installed-tests/libjcat/
drwxr-xr-x root/root        0 2022-12-19 17:58 usr/libexec/installed-tests/libjcat/colorhug/
-rw-r--r-- root/root      8000 2022-12-19 17:57 usr/libexec/installed-tests/libjcat/colorhug/firmware.bin
-rw-r--r-- root/root      473 2022-12-19 17:57 usr/libexec/installed-tests/libjcat/colorhug/firmware.bin.asc
-rw-r--r-- root/root      2261 2022-12-19 17:57 usr/libexec/installed-tests/libjcat/colorhug/firmware.bin.p7b
-rw-r--r-- root/root      2350 2022-12-19 17:57 usr/libexec/installed-tests/libjcat/colorhug/firmware.bin.p7c
-rwxr-xr-x root/root    104496 2022-12-19 17:58 usr/libexec/installed-tests/libjcat/jcat-self-test
drwxr-xr-x root/root        0 2022-12-19 17:58 usr/libexec/installed-tests/libjcat/pki/
-rw-r--r-- root/root      959 2022-12-19 17:57 usr/libexec/installed-tests/libjcat/pki/GPG-KEY-Linux-Vendor-Firmware-Service
-rw-r--r-- root/root      1679 2022-12-19 17:57 usr/libexec/installed-tests/libjcat/pki/LVFS-CA.pem

I tried on both -current & 15.0

kjhambrick 12-19-2022 11:32 AM

OMG !

I remember now that I messed with the meson options in the fwupd.SlackBuild last week.

I reinstalled the fwupd.SlackBuild files on my system and now the package includes the libjcat files and `fwupdtool` works as expected.

Sorry about the waste of time.

-- kjh
Code:

# fwupdtool --version

compile  org.freedesktop.fwupd        1.7.10
runtime  org.freedesktop.gusb          0.4.2
runtime  org.kernel                    5.15.84.kjh
compile  org.freedesktop.gusb          0.4.2
compile  com.hughsie.libjcat          0.1.9
runtime  org.freedesktop.fwupd        1.7.10



All times are GMT -5. The time now is 11:47 AM.