Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 902727 - sci-libs/pytorch-1.13.1-r1 compilation fails on "x86_64-pc-linux-gnu-gcc: fatal error: no input files"
Summary: sci-libs/pytorch-1.13.1-r1 compilation fails on "x86_64-pc-linux-gnu-gcc: fat...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Tupone Alfredo
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-22 12:59 UTC by vm666
Modified: 2023-03-24 21:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
/var/tmp/portage/sci-libs/pytorch-1.13.1-r1/temp/build.log (build.log,6.27 KB, text/plain)
2023-03-22 12:59 UTC, vm666
Details
emerge --info '=sci-libs/pytorch-1.13.1-r1::gentoo' (emerge-info.txt,13.70 KB, text/plain)
2023-03-22 13:00 UTC, vm666
Details
emerge -pqv '=sci-libs/pytorch-1.13.1-r1::gentoo' (emerge.txt,214 bytes, text/plain)
2023-03-22 13:00 UTC, vm666
Details
build.log with MAKEOPTS=-j1 (build-j1.log,215.08 KB, text/x-log)
2023-03-23 10:41 UTC, vm666
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vm666 2023-03-22 12:59:04 UTC
The previous version of this package installed fine, but it has been removed from the portage tree.
emerge =sci-libs/pytorch-1.13.1-r1 fails on this error: 

creating build/lib.linux-x86_64-cpython-310/functorch
x86_64-pc-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -march=westmere -mtune=westmere -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -maes -pipe -fPIC -I/usr/include/python3.10 -c torch/csrc/stub_with_flatbuffer.c -o build/temp.linux-x86_64-cpython-310/torch/csrc/stub_with_flatbuffer.o -Wall -Wextra -Wno-strict-overflow -Wno-unused-parameter -Wno-missing-field-initializers -Wno-write-strings -Wno-unknown-pragmas -Wno-deprecated-declarations -fno-strict-aliasing -Wno-missing-braces -g
x86_64-pc-linux-gnu-gcc -shared -O2 -pipe -ggdb -flifetime-dse=1 -O2 -march=westmere -mtune=westmere -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -maes -pipe -L/usr/lib64 -o build/lib.linux-x86_64-cpython-310/functorch/_C.cpython-310-x86_64-linux-gnu.so
x86_64-pc-linux-gnu-gcc: fatal error: no input files
compilation terminated.


Reproducible: Always

Steps to Reproduce:
1. emerge --autounmask --autounmask-write =sci-libs/pytorch-1.13.1-r1,  ; etc-update
2. emerge sci-libs/pytorch




The previous version 1.12.0-r2 compiled fine.
Comment 1 vm666 2023-03-22 12:59:47 UTC
Created attachment 858587 [details]
/var/tmp/portage/sci-libs/pytorch-1.13.1-r1/temp/build.log
Comment 2 vm666 2023-03-22 13:00:26 UTC
Created attachment 858589 [details]
emerge --info '=sci-libs/pytorch-1.13.1-r1::gentoo'
Comment 3 vm666 2023-03-22 13:00:55 UTC
Created attachment 858593 [details]
emerge -pqv '=sci-libs/pytorch-1.13.1-r1::gentoo'
Comment 4 Tupone Alfredo gentoo-dev 2023-03-23 07:14:11 UTC
can you build pytorch with MAKEOPTS=-j1 and re-post the log ?
Comment 5 vm666 2023-03-23 10:41:01 UTC
Created attachment 858681 [details]
build.log with MAKEOPTS=-j1
Comment 6 vm666 2023-03-23 10:43:21 UTC
(In reply to Tupone Alfredo from comment #4)
> can you build pytorch with MAKEOPTS=-j1 and re-post the log ?

Here it is.

I really don't understand what changed with the previous version. Although, it seems that other people compile it fine. I tried changing the python targets to no avail.

I have a second machine where it does not compile. Slightly different architecture (Jasper Lake) but still a hardened profile. Would the build.log from there be helpful?
Comment 7 Tupone Alfredo gentoo-dev 2023-03-24 20:57:06 UTC
Try to add some option to the LDFLAGS like -Wl,O1

I still do not know why, but linking without object files to link works if you have some linker option
Comment 8 Larry the Git Cow gentoo-dev 2023-03-24 21:42:13 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4836af254dee6b81c749b3df569d7c5bd6faa98

commit f4836af254dee6b81c749b3df569d7c5bd6faa98
Author:     Alfredo Tupone <tupone@gentoo.org>
AuthorDate: 2023-03-24 21:40:49 +0000
Commit:     Alfredo Tupone <tupone@gentoo.org>
CommitDate: 2023-03-24 21:41:36 +0000

    sci-libs/pytorch: drop building an empty .so
    
    Closes: https://bugs.gentoo.org/902727
    Signed-off-by: Alfredo Tupone <tupone@gentoo.org>

 sci-libs/pytorch/files/pytorch-1.13.1-emptyso.patch       | 15 +++++++++++++++
 ...{pytorch-1.13.1-r1.ebuild => pytorch-1.13.1-r2.ebuild} |  1 +
 2 files changed, 16 insertions(+)