Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed: phase compiling: apt-0.5.4-1061 failed #965

Open
dak180 opened this issue Jan 30, 2023 · 13 comments · May be fixed by #957
Open

Failed: phase compiling: apt-0.5.4-1061 failed #965

dak180 opened this issue Jan 30, 2023 · 13 comments · May be fixed by #957
Assignees
Labels
arm64 Build issues and fixes for Apple Silicon

Comments

@dak180
Copy link
Member

dak180 commented Jan 30, 2023

Setting runtime build-lock...
dpkg-deb -b /opt/sw/src/fink.build/root-fink-buildlock-apt-0.5.4-1061 /opt/sw/src/fink.build
dpkg-deb: building package 'fink-buildlock-apt-0.5.4-1061' in '/opt/sw/src/fink.build/fink-buildlock-apt-0.5.4-1061_2023.01.30-11.48.10_darwin-arm64.deb'.
Installing build-lock package...
/opt/sw/bin/dpkg-lockwait -i /opt/sw/src/fink.build/fink-buildlock-apt-0.5.4-1061_2023.01.30-11.48.10_darwin-arm64.deb
Selecting previously unselected package fink-buildlock-apt-0.5.4-1061.
(Reading database ... 31683 files and directories currently installed.)
Preparing to unpack .../fink-buildlock-apt-0.5.4-1061_2023.01.30-11.48.10_darwin-arm64.deb ...
Unpacking fink-buildlock-apt-0.5.4-1061 (2023.01.30-11.48.10) ...
Setting up fink-buildlock-apt-0.5.4-1061 (2023.01.30-11.48.10) ...
sudo -u fink-bld [ENV] sh -c /tmp/fink.wbj8L
env LANG=C LC_ALL=C /opt/sw/bin/tar  --no-same-owner --no-same-permissions -xf /opt/sw/src/apt_0.5.4.tar.gz
sudo -u fink-bld [ENV] sh -c /tmp/fink.K6FUX
[ -r /opt/sw/fink/dists/stable/main/finkinfo/base/apt.patch ]
sudo -u fink-bld [ENV] sh -c /tmp/fink.BWV4Q
sed -e 's|@PREFIX@|/opt/sw|g' -e 's|@DIST@|10.3|g' < /opt/sw/fink/dists/stable/main/finkinfo/base/apt.patch | patch -p1
patching file apt-inst/deb/dpkgdb.cc
patching file apt-inst/makefile
patching file apt-pkg/contrib/mmap.cc
patching file apt-pkg/contrib/mmap.h
patching file apt-pkg/deb/debindexfile.cc
patching file apt-pkg/deb/deblistparser.cc
patching file apt-pkg/deb/debsystem.cc
patching file apt-pkg/deb/debsystem.h
patching file apt-pkg/deb/debversion.cc
patching file apt-pkg/init.cc
patching file apt-pkg/pkgcachegen.cc
patching file apt-pkg/pkgcachegen.h
patching file apt-pkg/policy.cc
patching file apt-pkg/tagfile.cc
patching file apt-pkg/tagfile.h
patching file buildlib/environment.mak.in
patching file buildlib/library.mak
patching file buildlib/ostable
patching file cmdline/apt-cache.cc
patching file cmdline/apt-get.cc
patching file cmdline/apt-sortpkgs.cc
patching file configure
patching file configure.in
patching file doc/apt-cache.8
patching file doc/apt-cdrom.8
patching file doc/apt-config.8
patching file doc/apt-get.8
patching file doc/apt_preferences.5
patching file doc/sources.list.5
patching file dselect/install
patching file dselect/setup
patching file dselect/update
patching file methods/connect.cc
patching file methods/ftp.cc
patching file methods/rfc2553emu.h
patching file patch_flush
patching file apt-inst/contrib/extracttar.cc
patching file apt-pkg/contrib/system.h
patching file apt-inst/extract.cc
patching file apt-inst/deb/dpkgdb.cc
patching file apt-pkg/algorithms.cc
patching file apt-pkg/init.cc
patching file apt-pkg/deb/debsystem.cc
patching file apt-pkg/contrib/cdromutl.cc
patching file cmdline/apt-cache.cc
patching file cmdline/apt-config.cc
patching file cmdline/apt-extracttemplates.cc
patching file cmdline/apt-sortpkgs.cc
patching file apt-inst/contrib/extracttar.cc
patching file apt-pkg/deb/debsystem.h
patching file apt-pkg/pkgsystem.h
perl -pi -e 's|vector.h|vector|g' apt-pkg/pkgsystem.h include/apt-pkg/pkgsystem.h
Can't open include/apt-pkg/pkgsystem.h: No such file or directory, <> line 97.
perl -pi -e 's|iostream.h|iostream|g' apt-inst/contrib/extracttar.cc apt-inst/deb/dpkgdb.cc apt-inst/extract.cc apt-pkg/algorithms.cc apt-pkg/contrib/error.cc cmdline/apt-cache.cc cmdline/indexcopy.cc test/versiontest.cc 
perl -pi -e 's|fstream.h|fstream|g' apt-pkg/sourcelist.cc cmdline/apt-get.cc
sh patch_flush
for i in `grep -rl '#ifdef __GNUG__' .` ; do perl -pi -e 's/#ifdef __GNUG__/#if defined(__GNUG__) && !defined(__APPLE_CC__)/' $i; done
echo "x86_64\tx86_64" >> /opt/sw/src/fink.build/apt-0.5.4-1061/apt-0.5.4/buildlib/archtable
sudo -u fink-bld [ENV] sh -c /tmp/fink.DOSt_
./configure --prefix=/opt/sw --host=arm64-apple-darwin`uname -r|cut -f1 -d.`
creating cache ./config.cache
checking host system type... Invalid configuration `arm64-apple-darwin21': machine `arm64-apple' not recognized

checking target system type... Invalid configuration `arm64-apple-darwin21': machine `arm64-apple' not recognized

checking build system type... Invalid configuration `arm64-apple-darwin21': machine `arm64-apple' not recognized

checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for POSIXized ISC... no
checking for c++... c++
checking whether the C++ compiler (c++ -O2 -DEMULATE_MMAP -D__USE_MISC -fconstant-cfstrings -DHAVE_SOCKLEN_T=1 ) works... yes
checking whether the C++ compiler (c++ -O2 -DEMULATE_MMAP -D__USE_MISC -fconstant-cfstrings -DHAVE_SOCKLEN_T=1 ) is a cross-compiler... no
checking whether we are using GNU C++... yes
checking whether c++ accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for ranlib... ranlib
checking for arm64-apple-darwin21-ar... no
checking for ar... ar
checking for library containing gethostbyname... none required
checking for library containing connect... none required
checking for db2/db.h... no
checking system architecture... configure: error: failed: use --host=
### execution of ./configure failed, exit code 1
### execution of /tmp/fink.DOSt_ failed, exit code 1
Removing runtime build-lock...
Removing build-lock package...
/opt/sw/bin/dpkg-lockwait -r fink-buildlock-apt-0.5.4-1061
(Reading database ... 31684 files and directories currently installed.)
Removing fink-buildlock-apt-0.5.4-1061 (2023.01.30-11.48.10) ...
Failed: phase compiling: apt-0.5.4-1061 failed
Package manager version: 0.45.99.git
Distribution version: selfupdate-rsync Mon Jan 30 11:20:25 2023, 12.0, arm64
Trees: local/main remote/dak180 stable/main local/injected
Xcode.app: 14.2
Xcode command-line tools: 14.2.0.0.1.1668646533
Max. Fink build jobs:  1
@dak180 dak180 added the arm64 Build issues and fixes for Apple Silicon label Jan 30, 2023
@dhomeier
Copy link
Contributor

Build should be fixed by 9c2e748,
but I am unable to use (either the patched version or the original on x86_64, including on 12.6 and 10.14.6) with dpkg-1.16.
On 13.2 running any command fails with

% sudo apt-get check                                    
E: Error while setting up data-piping from fink-virtual-pkgs
E: The package lists or status file could not be parsed or opened.

On my new 10.14.6 installation it's

sudo apt-get check                                                                                                                                                  
Reading Package Lists... Error!
E: Malformed 3rd word in the Status line
E: Error occured while processing 64bit-cpu (UsePackage3)
E: Problem with MergeList /tmp/finkaptstatus
E: The package lists or status file could not be parsed or opened.

I suspect one of the new package description fields is not compatible with apt-0.5.4, but can't tell from the above diagnostics what it is.

As 0.5.4 is ancient I've made some wild experiments with updating for a new version, but with the oldest version that is still available at https://security.debian.org and does not pull in a bunch of new BDeps, unsurprisingly less than a quarter of the patches still work, and trying to get around the worst gnu_linux-isms I am currently stuck with
https://salsa.debian.org/apt-team/apt/-/blob/1.4.10/apt-pkg/contrib/srvrec.cc
which is using another Linux-only function getservbyport_r plus lots of macros like PACKETZS I have no idea where to get from on Darwin.

@TheSin-
Copy link
Member

TheSin- commented Jan 30, 2023

when my PR is added there is an apt that is updated in my experimental I can move over. Might need to just use that one for now.

@dhomeier dhomeier linked a pull request Jan 30, 2023 that will close this issue
@dak180 dak180 linked a pull request Jan 30, 2023 that will close this issue
@kristibektashi
Copy link

This is still an issue on macOS 14 arm64 with Xcode 15

@TheSin-
Copy link
Member

TheSin- commented Sep 26, 2023

Use the apt from my exp it’s build for newer macos with dpkg 1.15+

@kristibektashi
Copy link

Use the apt from my exp it’s build for newer macos with dpkg 1.15+

How do I do that?

@kristibektashi
Copy link

@TheSin-

@TheSin-
Copy link
Member

TheSin- commented Sep 28, 2023

I’ll see about moving it over. Though apt really isn’t useful anymore since we no longer have a bindist at the moment

@kristibektashi
Copy link

I’ll see about moving it over. Though apt really isn’t useful anymore since we no longer have a bindist at the moment

What happened to the bindist?

@TheSin-
Copy link
Member

TheSin- commented Sep 28, 2023

just didn't have the time/resources since @bcully left. I want to restart them but I just don't have the time to set it up ATM.

@nieder
Copy link
Member

nieder commented Sep 28, 2023

Although there's no bindist, doesn't fink remove -r FOO use apt and/or apt-get under the hood?

@TheSin-
Copy link
Member

TheSin- commented Sep 28, 2023

maybe we should add a block to detect is apt is present and if not skip that block? I know I don't have apt and fink works perfectly but then again I never used fink remove, I always use dpkg --purge

regardless we just need to test my newer version specially on older fink/macOS and copy it over IMHO and this is solved.

@dhomeier
Copy link
Contributor

Yes, fink remove -r is pretty broken without apt, and dpkg does not keep a good track of dependencies – at least I usually found fink in a rather inconsistent state after using it.

@TheSin-
Copy link
Member

TheSin- commented Sep 28, 2023

if you use --force-all you'll break it, otherwise it'll tell you depends and you go down the chain. I do it all the time, like daily, on fink and on true debian.

That being sad the apt in my exp did work last I checked, so it should still and should solve these issues. It likely can just be brought up, it was there waiting for dpkg 1.15+ which is on the bd list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arm64 Build issues and fixes for Apple Silicon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants