runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Disable to generate Debian packages during the cross builds

Open jyoungyun opened this issue 9 years ago • 5 comments

Steps to reproduce

./build.sh --env-vars DISABLE_CROSSGEN=1,CONFIGURATION=Release,TARGETPLATFORM=arm,TARGETRID=ubuntu.14.04-arm,CROSS=1,ROOTFS_DIR=/home/jyoung/git/dotnet/rootfs-coreclr/arm/

Expected behavior

Build succeed

Actual behavior

dpkg-shlibdeps: error: couldn't find library libdl.so.2 needed by debian/dotnet-host/usr/share/dotnet/dotnet (ELF format: 'elf32-littlearm-hfabi'; RPATH: '')
dpkg-shlibdeps: error: couldn't find library libpthread.so.0 needed by debian/dotnet-host/usr/share/dotnet/dotnet (ELF format: 'elf32-littlearm-hfabi'; RPATH: '')
dpkg-shlibdeps: error: couldn't find library libstdc++.so.6 needed by debian/dotnet-host/usr/share/dotnet/dotnet (ELF format: 'elf32-littlearm-hfabi'; RPATH: '')
dpkg-shlibdeps: error: couldn't find library libm.so.6 needed by debian/dotnet-host/usr/share/dotnet/dotnet (ELF format: 'elf32-littlearm-hfabi'; RPATH: '')
dpkg-shlibdeps: error: couldn't find library libgcc_s.so.1 needed by debian/dotnet-host/usr/share/dotnet/dotnet (ELF format: 'elf32-littlearm-hfabi'; RPATH: '')
dpkg-shlibdeps: error: couldn't find library libc.so.6 needed by debian/dotnet-host/usr/share/dotnet/dotnet (ELF format: 'elf32-littlearm-hfabi'; RPATH: '')
dpkg-shlibdeps: error: couldn't find library ld-linux-armhf.so.3 needed by debian/dotnet-host/usr/share/dotnet/dotnet (ELF format: 'elf32-littlearm-hfabi'; RPATH: '')
dpkg-shlibdeps: error: cannot continue due to the errors listed above
Note: libraries are not searched in other binary packages that do not have any shlibs or symbols file.
To help dpkg-shlibdeps find private libraries, you might need to use -l.
dh_shlibdeps: dpkg-shlibdeps -Tdebian/dotnet-host.substvars debian/dotnet-host/usr/share/dotnet/dotnet returned exit code 2
make: *** [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
debuild: fatal error at line 1364:
dpkg-buildpackage -rfakeroot -D -us -uc failed
[EXEC       <] [FAIL] [00:00:55.787] /home/jyoung/git/dotnet/core-setup-jy/artifacts/ubuntu.14.04-arm/intermediate/dotnet-deb-tool-consumer> /home/jyoung/git/dotnet/core-setup-jy/.dotnet_stage0/Linux/dotnet "-v" "deb-tool" "-i" "/home/jyoung/git/dotnet/core-setup-jy/artifacts/ubuntu.14.04-arm/intermediate/dotnet-host/1.2.0-beta-001204-00/debianLayoutDirectory" "-o" "/home/jyoung/git/dotnet/core-setup-jy/artifacts/ubuntu.14.04-arm/intermediate/dotnet-host/1.2.0-beta-001204-00" "-n" "dotnet-host" "-v" "1.2.0-beta-001204-00" exited with 1
[TARGET     <] [FAIL] [00:00:55.788] GenerateSharedHostDeb                                      (Microsoft.DotNet.Host.Build.DebTargets.GenerateSharedHostDeb)
[TARGET     <] [FAIL] [00:00:55.788] GenerateDebs                                               (Microsoft.DotNet.Host.Build.DebTargets.GenerateDebs)
[TARGET     <] [FAIL] [00:00:55.788] GenerateInstaller                                          (Microsoft.DotNet.Host.Build.InstallerTargets.GenerateInstaller)
[TARGET     <] [FAIL] [00:00:55.788] Package                                                    (Microsoft.DotNet.Host.Build.PackageTargets.Package)
[TARGET     <] [FAIL] [00:00:55.788] Default                                                    (Standard Goals)
Build failed: Microsoft.DotNet.Cli.Build.Framework.BuildFailureException: Command failed with exit code 1: /home/jyoung/git/dotnet/core-setup-jy/.dotnet_stage0/Linux/dotnet "-v" "deb-tool" "-i" "/home/jyoung/git/dotnet/core-setup-jy/artifacts/ubuntu.14.04-arm/intermediate/dotnet-host/1.2.0-beta-001204-00/debianLayoutDirectory" "-o" "/home/jyoung/git/dotnet/core-setup-jy/artifacts/ubuntu.14.04-arm/intermediate/dotnet-host/1.2.0-beta-001204-00" "-n" "dotnet-host" "-v" "1.2.0-beta-001204-00"
   at Microsoft.DotNet.Cli.Build.Framework.CommandResult.EnsureSuccessful(Boolean suppressOutput)
   at Microsoft.DotNet.Cli.Build.DebPackageCreator.CreateDebianPackage(DebianLayoutDirectories debianLayoutDirectories, String intermediatesOutputDirectory, String outputFile, String packageName, String packageVersion)
   at Microsoft.DotNet.Cli.Build.DebPackageCreator.CreateDeb(String debianConfigJsonFile, String packageName, String packageVersion, String inputBinariesDirectory, Dictionary`2 debianConfigVariables, String outputFile, String manpagesDirectory)
   at Microsoft.DotNet.Host.Build.DebTargets.GenerateSharedHostDeb(BuildTargetContext c)
   at Microsoft.DotNet.Cli.Build.Framework.BuildContext.ExecTarget(BuildTarget target)

In my opinion, when the cross builds, we should not generate debian packages. I will post a PR, which is to use 'DOTNET_CROSS_BUILD' environment. If there is a better way, please give me advice.

jyoungyun avatar Dec 20 '16 07:12 jyoungyun

cc: @hqueue @idkiller @hseok-oh @chunseoklee

jyoungyun avatar Dec 20 '16 07:12 jyoungyun

Does this happen only when you build on a Debian box (since I thought it was validated to work on Ubuntu 14.04 and 16.04)?

gkhanna79 avatar Dec 20 '16 18:12 gkhanna79

@gkhanna79 Yes, this error occurs only when I build on a Debian box. I think we cross-builds, so it seems that the debian package for ARM can not be created properly on x64 host environment. I'm checking how to create a debian package for cross-builds. If there is no good way, I will post a PR for disabling 'GenerateDebs' Target when we cross-builds.

jyoungyun avatar Dec 26 '16 00:12 jyoungyun

Do we need to update InstallerTargets including Msi ?

No, we will produce an archive file for Linux Arm32 that will get listed in the DailyBuilds section in Readme.md.

@gkhanna79 We thought we only need tarball and don't need debian pacakge files for Linux ARM32 after reading your comment at https://github.com/dotnet/core-setup/pull/712#issuecomment-267478168. Do we need deb files for Linux ARM32 too ?

hqueue avatar Dec 26 '16 07:12 hqueue

@hqueue Yes, we only need to generate the tarball for all the cross builds (including arm32). @jyoungyun Please add a check to conditionally disable generating the deb packages.

gkhanna79 avatar Dec 27 '16 16:12 gkhanna79