ola
ola copied to clipboard
Building *.deb files for RPI fails on missing original tar file
Using Debian Stretch on Rpi 3B+
Build ola from git as following:
git clone https://github.com/OpenLightingProject/ola.git
cd ola
autoreconf -i
./configure
make -j 4 all
sudo make install
sudo ldconfig
Then trying to build *.deb files as described here:
autoreconf -i
./configure
make dist
cp ola-0.10.7.tar.gz /tmp
cd /tmp
tar -zxf ola-0.10.7.tar.gz
cd ola-0.10.7
debuild
debuild gives following error which I do not quite understand, should I rename /tmp/ola-0.10.7.tar.gz to /tmp/ola-0.10.7.orig.tar.gz ?
This package has a Debian revision number but there does not seem to be
an appropriate original tar file or .orig directory in the parent directory;
(expected one of ola_0.10.7.orig.tar.gz, ola_0.10.7.orig.tar.bz2,
ola_0.10.7.orig.tar.lzma, ola_0.10.7.orig.tar.xz or ola-0.10.7.orig)
continue anyway? (y/n)
when typing yes:
dpkg-source: info: using options from ola-0.10.7/debian/source/local-options: --single-debian-patch
dpkg-source: error: can't build with source format '3.0 (quilt)': no upstream tarball found at ../ola_0.10.7.orig.tar.{bz2,gz,lzma,xz}
dpkg-buildpackage: error: dpkg-source -b ola-0.10.7 gave error exit status 255
debuild: fatal error at line 1116:
dpkg-buildpackage -rfakeroot -us -uc failed
Anyone good @building deb packages who can give me some advise ?
Ok, renaming seems to do the trick, I renamed /tmp/ola-0.10.7.tar.gz to ola_0.10.7.orig.tar.gz :
mv /tmp/ola-0.10.7.tar.gz /tmp/ola_0.10.7.orig.tar.gz
now debuild seems to build the package.
Still not able to fully build:
SocketTest.cpp:405:Assertion
Test name: SocketTest::testUDPSocket
equality assertion failed
- Expected: 127.0.0.1
- Actual : 192.168.2.105
SocketTest.cpp:405:Assertion
Test name: SocketTest::testIOQueueUDPSend
equality assertion failed
- Expected: 127.0.0.1
- Actual : 192.168.2.105
Failures !!!
Run: 21 Failure total: 2 Failures: 2 Errors: 0
FAIL common/network/NetworkTester (exit status: 1)
============================================================================
Testsuite summary for OLA 0.10.7
============================================================================
# TOTAL: 93
# PASS: 91
# SKIP: 0
# XFAIL: 0
# FAIL: 2
# XPASS: 0
# ERROR: 0
============================================================================
See ./test-suite.log
Please report to [email protected]
============================================================================
Makefile:16651: recipe for target 'test-suite.log' failed
make[5]: *** [test-suite.log] Error 1
make[5]: Leaving directory '/tmp/ola-0.10.7'
Makefile:16757: recipe for target 'check-TESTS' failed
make[4]: *** [check-TESTS] Error 2
make[4]: Leaving directory '/tmp/ola-0.10.7'
Makefile:17604: recipe for target 'check-am' failed
make[3]: *** [check-am] Error 2
make[3]: Leaving directory '/tmp/ola-0.10.7'
Makefile:16537: recipe for target 'check-recursive' failed
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory '/tmp/ola-0.10.7'
Makefile:17608: recipe for target 'check' failed
make[1]: *** [check] Error 2
make[1]: Leaving directory '/tmp/ola-0.10.7'
dh_auto_test: make -j4 check VERBOSE=1 returned exit code 2
debian/rules:14: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
debuild: fatal error at line 1116:
dpkg-buildpackage -rfakeroot -us -uc failed
anyone experienced in building *.deb packages? is the error only caused by the test which do not accept a fix IP address?
I figured out to run debuild
as regular user instead of root helped to get rid of one error.
Now I am still stuck with the common/network/NetworkTester failing
, which prevents the final *.deb building:
(or is it debuild: fatal error at line 1116:
?)
==================================
OLA 0.10.7: ./test-suite.log
==================================
# TOTAL: 93
# PASS: 92
# SKIP: 0
# XFAIL: 0
# FAIL: 1
# XPASS: 0
# ERROR: 0
.. contents:: :depth: 2
FAIL: common/network/NetworkTester
==================================
.common/network/IPV4Address.cpp:89: Could not convert address foo
....
lo
Index: 1
IP: 127.0.0.1
Broadcast: 0.0.0.0
Subnet: 255.0.0.0
Type: 772
MAC: 00:00:00:00:00:00
Loopback: 1
---------------
eth0
Index: 2
IP: 192.168.2.105
Broadcast: 192.168.2.255
Subnet: 255.255.255.0
Type: 1
MAC: b8:27:eb:ac:91:b8
Loopback: 0
---------------
wlan0
Index: 3
IP: 2.0.0.105
Broadcast: 2.0.0.255
Subnet: 255.255.255.0
Type: 1
MAC: b8:27:eb:f9:c4:ed
Loopback: 0
---------------
..common/network/InterfacePicker.cpp:59: No interfaces found
common/network/InterfacePicker.cpp:116: No interfaces found
common/network/IPV4Address.cpp:89: Could not convert address eth0
common/network/IPV4Address.cpp:89: Could not convert address eth1
common/network/IPV4Address.cpp:89: Could not convert address foo
.common/network/IPV4Address.cpp:89: Could not convert address 192.168.1.
common/network/IPV4Address.cpp:89: Could not convert address 192.168.1.255.255
common/network/IPV4Address.cpp:89: Could not convert address foobarbaz
.......common/network/NetworkUtils.cpp:597: Default gateway: 192.168.2.1, if_index: 2
.common/network/SocketAddress.cpp:58: Length passed to ToSockAddr is too small.
..common/network/SocketTest.cpp:347: Connection from 192.168.2.105:33312
common/io/SelectServer.cpp:186: Removing an invalid file descriptor: 0xfea00
.common/network/SocketTest.cpp:365: Connection from 192.168.2.105:53050
.common/network/Socket.cpp:151: bind(127.0.0.1:0): Invalid argument
F.common/network/Socket.cpp:151: bind(127.0.0.1:9010): Invalid argument
F
SocketTest.cpp:405:Assertion
Test name: SocketTest::testUDPSocket
equality assertion failed
- Expected: 127.0.0.1
- Actual : 192.168.2.105
SocketTest.cpp:405:Assertion
Test name: SocketTest::testIOQueueUDPSend
equality assertion failed
- Expected: 127.0.0.1
- Actual : 192.168.2.105
Failures !!!
Run: 21 Failure total: 2 Failures: 2 Errors: 0
FAIL common/network/NetworkTester (exit status: 1)
============================================================================
Testsuite summary for OLA 0.10.7
============================================================================
# TOTAL: 93
# PASS: 92
# SKIP: 0
# XFAIL: 0
# FAIL: 1
# XPASS: 0
# ERROR: 0
============================================================================
See ./test-suite.log
Please report to [email protected]
============================================================================
Makefile:16651: recipe for target 'test-suite.log' failed
make[5]: *** [test-suite.log] Error 1
make[5]: Leaving directory '/tmp/ola-0.10.7'
Makefile:16757: recipe for target 'check-TESTS' failed
make[4]: *** [check-TESTS] Error 2
make[4]: Leaving directory '/tmp/ola-0.10.7'
Makefile:17604: recipe for target 'check-am' failed
make[3]: *** [check-am] Error 2
make[3]: Leaving directory '/tmp/ola-0.10.7'
Makefile:16537: recipe for target 'check-recursive' failed
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory '/tmp/ola-0.10.7'
Makefile:17608: recipe for target 'check' failed
make[1]: *** [check] Error 2
make[1]: Leaving directory '/tmp/ola-0.10.7'
dh_auto_test: make -j4 check VERBOSE=1 returned exit code 2
debian/rules:14: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
debuild: fatal error at line 1116:
dpkg-buildpackage -rfakeroot -us -uc failed
To successfully compile a *.deb file on RPI, you need to disable the wifi and disable static network, otherwise the unitests will fail because they only run when IP is 127.0.0.1
That's a bug in the tests or our Debian config @magdesign . Are you saying you don't get the same issue if you run make check
in a normal git checkout (having compiled etc)?
The error only appears when I have set my /etc/network/interfaces
to a static IP address and/or the wlan as hotspot with a fixed IP address too.
To get compiling done, I disabled the wifi in kernel with a dtoverlay=disable-wifi
set the network to dhcp and unplugged the RJ45 cable, then doing all the debuild commands with a keyboard (no ssh).
I think there is an error in the Debian tests, which should check first with ifconfig
to get the current IP address and then expect that address....
The error only appears when I have set my
/etc/network/interfaces
to a static IP address and/or the wlan as hotspot with a fixed IP address too.
But at that point did it only fail via debuild or make check
too?
If it fails with both, could you try the same thing with DHCP on one or other interface (with the other disabled) i.e. is the issue having a static address?
I think there is an error in the Debian tests, which should check first with
ifconfig
to get the current IP address and then expect that address....
They are just the tests, there are a tiny handful specific to Debian and these aren't part of them. The tests should be binding to localhost: https://github.com/OpenLightingProject/ola/blob/0.10/common/network/SocketTest.cpp#L208-L242
Regular building works, but debuild fails.
If it fails with both, could you try the same thing with DHCP on one or other interface (with the other disabled) i.e. is the issue having a static address?
The issue is having a static address on one of the interfaces, it fails as soon as there is a static address somewhere.
I can not read C, but it must be there somewhere:
OLA_ASSERT_TRUE(IPV4Address::FromString("127.0.0.1", &expected_address));
BTW. Is there a flag to disable the network tests?
Will pull the newest release and do compiling again from a clean system to provide you detailed logs.
Regular building works, but debuild fails.
Just to clarify 100%, do you mean make
succeeds or make check
succeeds? The former won't run the tests so wouldn't hit this issue.
The issue is having a static address on one of the interfaces, it fails as soon as there is a static address somewhere.
Curious.
I can not read C, but it must be there somewhere:
OLA_ASSERT_TRUE(IPV4Address::FromString("127.0.0.1", &expected_address));
Yeah that’s the test line that's failing, the setup is a bit further up.
BTW. Is there a flag to disable the network tests?
Nothing specific for the network tests, this looks like it could work, but I'd rather we fix them if possible: https://iomem.com/archives/18-Avoiding-tests-when-building-Debian-packages.html
Will pull the newest release and do compiling again from a clean system to provide you detailed logs.
Rather than pulling a release, can you test 0.10 branch. This URL should work: https://github.com/OpenLightingProject/ola/archive/0.10.zip
Sorry that it took so long. I finally pulled v. 0.10, compiled and make check, still got
Makefile:16953: recipe for target 'check' failed
make: *** [check] Error 2
What I did: git clone https://github.com/OpenLightingProject/ola.git cd ola/ git checkout 0.10 autoreconf -i ./configure make -j 4 all sudo make install sudo ldconfig make check
See the last part of the log here: https://gist.github.com/magdesign/26f3801a278dbde588bb7c3dc3557e5f
Anything else I can test or uncomment to test?
Edit: I also deleted line 665 - 683 and compiled again, still get errors..
That's weird. What's your configure line? I'm building on the latest raspbian and 0.10 compiles fine. I'm using ./configure --enable-rdm-tests --enable-ja-rule --enable-e133 CXXFLAGS=-Wno-deprecated-declarations PYTHON=python3
Where I run into problems is libtool is somehow setup wrong for running the tests: ./home/lowekamp/src/ola/olad/.libs/OlaTester: symbol lookup error: /home/lowekamp/src/ola/olad/.libs/OlaTester: undefined symbol: _ZNK3ola5Clock20CurrentMonotonicTimeEPNS_9TimeStampE
so I can't test debbuild
Bruce
On Sun, Nov 8, 2020 at 11:47 AM magdesign [email protected] wrote:
Sorry that it took so long. I finally pulled v. 0.10, compiled and make check, still got
Makefile:16953: recipe for target 'check' failed make: *** [check] Error 2
See the last part of the log here: https://gist.github.com/magdesign/26f3801a278dbde588bb7c3dc3557e5f
Anything else I can test or uncomment to test?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OpenLightingProject/ola/issues/1679#issuecomment-723630479, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADNHN5PFBQYI7V5TBDKGUKLSO3DSVANCNFSM4TFYV5EA .
I just did a ./configure
without flags.
This is 0.10 branch, right? I just tried it, and I get a ThreadTester failure under make check, but everything builds fine. Do you have environment variables set that might be changing the build? This is the latest version of raspbian? (I'm using a pi 4 that I set up about a month ago)
Bruce
On Tue, Nov 17, 2020 at 3:31 PM magdesign [email protected] wrote:
I just did a ./configure without flags.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/OpenLightingProject/ola/issues/1679#issuecomment-729183969, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADNHN5IR2WIRXOUYFGA6RBDSQLMSHANCNFSM4TFYV5EA .
Using Raspbian Stretch 9.11 on Rpi 3B+ 0.10 branch, yes.
having some masquerade rules to share wifi with rj45 and vice versa. also fix ip addresses.
I'm on buster. I don't know why that would make that difference, though.
@peter I still don't know why when I do the full build I get linking errors on the tests, but the thread tester error is apparently because the OS says max priority is 1 and then the test tries to set the FIFO priority to 0, which isn't legal according to sched. Should this be a max and not a min to make sure that doesn't happen?
diff --git a/common/thread/ThreadTest.cpp b/common/thread/ThreadTest.cpp index 507959145..1e3f0eb0a 100644 --- a/common/thread/ThreadTest.cpp +++ b/common/thread/ThreadTest.cpp @@ -151,7 +151,7 @@ void ThreadTest::testSchedulingOptions() { }
const int max_priority = rlim.rlim_cur - 1;
- const int other_priority = std::min(1, max_priority - 1);
- const int other_priority = std::max(1, max_priority - 1); #else const int max_priority = 31; const int other_priority = 15;
On Tue, Nov 17, 2020 at 4:48 PM magdesign [email protected] wrote:
Using Raspbian Stretch 9.11 on Rpi 3B+ 0.10 branch, yes.
having some masquerade rules to share wifi with rj45 and vice versa. also fix ip addresses.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/OpenLightingProject/ola/issues/1679#issuecomment-729233956, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADNHN5O5FZ4KFYL23XMEVKLSQLVRPANCNFSM4TFYV5EA .
@brucelowekamp the way the network is configured in /etc/network/interfaces changed some time between stretch and buster. This isn't completely unexpected.
Since @magdesign has a workaround, I think we should just ignore this (it works on modern systems) and perhaps document the workaround for older machines.