Bug#844144: w1retap: FTBFS: ld: cannot find -lowfat

2016-11-15 Thread Thomas Stewart
Hi Lucas,

Thanks for the report. I don't think this is TSX related, I think it's a
parallel build error.

Also the owfat referenced is not related to libowfat. The former being a
internal library built as part of w1retap and the latter being a
reimplementation of libdjb.

To replicate the build issue I created a 32 core KVM virtual machine[0]
on a host[1] and did a normal build of the package. This resulted in
what looks like the same error as your report[2].

When looking at src/libusblinux300/Makefile.am, Sam Morris
 noticed that it does not include libowfat.a in all the
_DEPENDENCIES lines. After I created a patch[3] to add this, the build
on the virtual machine started succeeding.

This does not prove it's not TSX related, however this does fix an
issue. So I'm going to send this upstream and ask my sponsor to upload
an update as well. After this is done it would be good if you could
retest on a m4.16xlarge instance again.

Thanks :-)

Kind Regards
--
Tom

[0] /proc/cpuinfo on vm
model   : 42
model name  : Intel Xeon E312xx (Sandy Bridge)
stepping: 1

[1] /proc/cpuinfo on host
model   : 62
model name  : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping: 4

[2]
libtool: link: gcc -g -O2 -fdebug-prefix-map=/root/w1retap-1.4.4=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wall -rdynamic 
-Wl,--export-dynamic -pthread -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--as-needed 
-o .libs/thermoms thermoms.o findtype.o thermo21.o  -lgmodule-2.0 -lglib-2.0 
-L. -lowfat /root/w1retap-1.4.4/src/libusblinux300/.libs/libw1common.so -lxml2 
-lrt -lm -pthread -Wl,-rpath -Wl,/usr/lib/x86_64-linux-gnu/w1retap
libtool: link: gcc -shared  -fPIC -DPIC  .libs/ds2480ut.o .libs/linuxlnk.o 
.libs/owllu.o .libs/ownetu.o .libs/owsesu.o .libs/owtrnu.o   -Wl,-rpath 
-Wl,/root/w1retap-1.4.4/src/libusblinux300/.libs -Wl,-rpath 
-Wl,/usr/lib/x86_64-linux-gnu/w1retap -L. 
/root/w1retap-1.4.4/src/libusblinux300/.libs/libw1common.so -lxml2 -lrt -lm  -g 
-O2 -fstack-protector-strong -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--as-needed   
-pthread -Wl,-soname -Wl,libw1serial.so.0 -o .libs/libw1serial.so.0.0.0
libtool: link: gcc -g -O2 -fdebug-prefix-map=/root/w1retap-1.4.4=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wall -rdynamic 
-Wl,--export-dynamic -pthread -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--as-needed 
-o .libs/ds192xtest ds192xtest-ds192x.o  -lgmodule-2.0 -lglib-2.0 -L. -lowfat 
/root/w1retap-1.4.4/src/libusblinux300/.libs/libw1common.so -lxml2 -lrt -lm 
-pthread -Wl,-rpath -Wl,/usr/lib/x86_64-linux-gnu/w1retap
libtool: link: gcc -g -O2 -fdebug-prefix-map=/root/w1retap-1.4.4=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wall -rdynamic 
-Wl,--export-dynamic -pthread -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--as-needed 
-o .libs/coupler coupler.o findtype.o  -lgmodule-2.0 -lglib-2.0 -L. -lowfat 
/root/w1retap-1.4.4/src/libusblinux300/.libs/libw1common.so -lxml2 -lrt -lm 
-pthread -Wl,-rpath -Wl,/usr/lib/x86_64-linux-gnu/w1retap
/usr/bin/ld: cannot find -lowfat
collect2: error: ld returned 1 exit status

[3]
--- w1retap-1.4.4.orig/src/libusblinux300/Makefile.am
+++ w1retap-1.4.4/src/libusblinux300/Makefile.am
@@ -31,92 +31,92 @@ libowfat_a_SOURCES = mbappreg.c mbeprom.
ds192x.c hbuv.c hbht.c
 
 w1find_SOURCES = w1find.c findtype.c
-w1find_DEPENDENCIES = libw1common.la
+w1find_DEPENDENCIES = libw1common.la libowfat.a
 w1find_LDADD = -L. -lowfat -lw1common -lm
 w1find_LDFLAGS = -rdynamic  $(GLIB_LIBS)
 
 braybaro_SOURCES = braybaro.c atod26.c screenio.c findtype.c
-braybaro_DEPENDENCIES = libw1common.la
+braybaro_DEPENDENCIES = libw1common.la libowfat.a
 braybaro_LDADD = -L. -lowfat -lw1common -lm
 braybaro_LDFLAGS = -rdynamic  $(GLIB_LIBS)
 
 temp_SOURCES = temp.c findtype.c
-temp_DEPENDENCIES = libw1common.la
+temp_DEPENDENCIES = libw1common.la libowfat.a
 temp_LDADD = -L. -lowfat -lw1common -lm
 temp_LDFLAGS = -rdynamic  $(GLIB_LIBS)
 
 gethumd_SOURCES = gethumd.c findtype.c
-gethumd_DEPENDENCIES = libw1common.la
+gethumd_DEPENDENCIES = libw1common.la libowfat.a
 gethumd_LDADD = -L. -lowfat -lw1common -lm
 gethumd_LDFLAGS = -rdynamic  $(GLIB_LIBS)
 
 coupler_SOURCES = coupler.c findtype.c
-coupler_DEPENDENCIES = libw1common.la
+coupler_DEPENDENCIES = libw1common.la libowfat.a
 coupler_LDADD = -L. -lowfat -lw1common -lm
 coupler_LDFLAGS = -rdynamic  $(GLIB_LIBS)
 
 humids_SOURCES = humid.c
-humids_DEPENDENCIES = libw1common.la
+humids_DEPENDENCIES = libw1common.la libowfat.a
 humids_LDADD = -L. -lowfat -lw1common -lm
 humids_LDFLAGS = -rdynamic  $(GLIB_LIBS)
 
 setds2409_SOURCES = setds2409.c
-setds2409_DEPENDENCIES = libw1common.la
+setds2409_DEPENDENCIES = libw1common.la libowfat.a
 setds2409_LDADD = -L. -lowfat -lw1common -lm
 setds2409_LDFLAGS = -rdynamic  $(GLIB_LIBS)
 
 counter_SOURCES = counter.c findtype.c
-counter_DEPENDENCIES = libw1common.la
+counter_DEPENDENCIES = libw1common.la libowfat.a
 counter_LDADD = -L. -lowfat 

Bug#844144: w1retap: FTBFS: ld: cannot find -lowfat

2016-11-12 Thread Lucas Nussbaum
Source: w1retap
Version: 1.4.4-1
Severity: serious
Tags: stretch sid
User: debian...@lists.debian.org
Usertags: qa-ftbfs-2016 qa-ftbfs
Justification: FTBFS on amd64

Hi,

During a rebuild of all packages in sid, your package failed to build on
amd64.

Relevant part (hopefully):
> /bin/bash ../../libtool  --tag=CC   --mode=link gcc  -g -O2 
> -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat 
> -Werror=format-security -Wall -rdynamic  -Wl,--export-dynamic -lgmodule-2.0 
> -pthread -lglib-2.0 -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o hbhttest 
> hbhttest.o -L. -lowfat -lw1common -lm -lxml2 -lrt -lm 
> libtool: link: gcc -shared  -fPIC -DPIC  .libs/ds2480ut.o .libs/linuxlnk.o 
> .libs/owllu.o .libs/ownetu.o .libs/owsesu.o .libs/owtrnu.o   -Wl,-rpath 
> -Wl,/<>/src/libusblinux300/.libs -Wl,-rpath 
> -Wl,/usr/lib/x86_64-linux-gnu/w1retap -L. 
> /<>/src/libusblinux300/.libs/libw1common.so -lxml2 -lrt -lm  -g 
> -O2 -fstack-protector-strong -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--as-needed  
>  -pthread -Wl,-soname -Wl,libw1serial.so.0 -o .libs/libw1serial.so.0.0.0
> libtool: link: gcc -g -O2 -fdebug-prefix-map=/<>=. 
> -fstack-protector-strong -Wformat -Werror=format-security -Wall -rdynamic 
> -Wl,--export-dynamic -pthread -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--as-needed 
> -o .libs/gethumd gethumd.o findtype.o  -lgmodule-2.0 -lglib-2.0 -L. -lowfat 
> /<>/src/libusblinux300/.libs/libw1common.so -lxml2 -lrt -lm 
> -pthread -Wl,-rpath -Wl,/usr/lib/x86_64-linux-gnu/w1retap
> libtool: link: gcc -g -O2 -fdebug-prefix-map=/<>=. 
> -fstack-protector-strong -Wformat -Werror=format-security -Wall -rdynamic 
> -Wl,--export-dynamic -pthread -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--as-needed 
> -o .libs/setds2409 setds2409.o  -lgmodule-2.0 -lglib-2.0 -L. -lowfat 
> /<>/src/libusblinux300/.libs/libw1common.so -lxml2 -lrt -lm 
> -pthread -Wl,-rpath -Wl,/usr/lib/x86_64-linux-gnu/w1retap
> /usr/bin/ld: cannot find -lowfat
> libtool: link: gcc -g -O2 -fdebug-prefix-map=/<>=. 
> -fstack-protector-strong -Wformat -Werror=format-security -Wall -rdynamic 
> -Wl,--export-dynamic -pthread -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--as-needed 
> -o .libs/counter counter.o findtype.o  -lgmodule-2.0 -lglib-2.0 -L. -lowfat 
> /<>/src/libusblinux300/.libs/libw1common.so -lxml2 -lrt -lm 
> -pthread -Wl,-rpath -Wl,/usr/lib/x86_64-linux-gnu/w1retap
> collect2: error: ld returned 1 exit status

The full build log is available from:
   http://aws-logs.debian.net/2016/11/11/w1retap_1.4.4-1_unstable.log

This failure happens on a CPU with TSX extensions available, but is not
reproducible on a machine without them. For context, I recommend reading the
thread starting at https://lists.debian.org/debian-devel/2016/11/msg00210.html

The node used is an Amazon EC2 VM with 64 cores. /proc/cpuinfo says:
   model: 79
   model name : Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz
   stepping : 1

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

About the archive rebuild: The rebuild was done on EC2 VM instances from
Amazon Web Services, using a clean, minimal and up-to-date chroot. Every
failed build was retried once to eliminate random failures.