Project

General

Profile

Problem with MKBUNDLE during make

Added by virtual dj about 12 years ago

Hello. I'm trying to compile the latest version from GIT (3.3-16-gaa5c84e) using a Debian squeeze VM under QEMU.
The goal is compiling the binary for the 'armel' processor architecture.

However, I want to include the HTML files into the binary so I've used this configure command line:

# ./configure --disable-avahi --enable-bundle

Although it configures correctly, I cannot make it:
MKBUNDLE                build.linux/bundle.c
Traceback (most recent call last):
  File "/root/tvheadends/tvheadend/support/mkbundle", line 156, in <module>
    idx = add_entry(ents)
  File "/root/tvheadend/tvheadend/support/mkbundle", line 135, in add_entry
    tmp = add_entry(ents[k], d, k, idx, p)
  File "/root/tvheadend/tvheadend/support/mkbundle", line 129, in add_entry
    output_file(d, k, idx+1, p)
  File "/root/tvheadend/tvheadend/support/mkbundle", line 69, in output_file
    d = open(p, 'rb').read()
IOError: [Errno 21] Is a directory: '/root/tvheadend/tvheadend/data/dvb-scan'
make: *** [build.linux/bundle.c] Error 1

I also tried to leave out zlib in this way:
./configure --disable-avahi --disable-zlib --enable-bundle

and but the error persists.

So I've tried the same commands on a x86 lenny (so older) VM and they work, thus it must be something in the armel VM that causes the error, but I'm not able to identify it.

VM info:

Linux debian-armel 2.6.32-5-versatile #1 Wed Jan 12 23:05:11 UTC 2011 armv5tejl GNU/Linux
gcc version 4.4.5 (Debian 4.4.5-8)
Python 2.6.6

Please, can you give me some tips on how to fix these errors?
I was able to compile TVHeadend successfully in the past (for example the EricV's branch 9b71601b0) with that VM.

Additionally... what is the disable-zlib supposed to do? What features will I lose if I leave zlib out?


Replies (7)

RE: Problem with MKBUNDLE during make - Added by Adam Sutton about 12 years ago

Can you attach the partially generated file, build.linux/bundle.c.

If you disable zlib then the files will not be compressed, so it depends if you're trying to reduce overall size or not.

But I don't think that's the issue, seems very odd that it works in once case and not the other.

I'm sure its obvious but I don't have time to think about it at the moment, but the partial C file might just help guide me.

Adam

RE: Problem with MKBUNDLE during make - Added by virtual dj about 12 years ago

Adam Sutton wrote:

Can you attach the partially generated file, build.linux/bundle.c.

Here you are, Adam. Thank you very much.

bundle.c.gz (868 KB) bundle.c.gz Partial bundle.c (w/o zlib)

RE: Problem with MKBUNDLE during make - Added by Adam Sutton about 12 years ago

Ok the good news is I've figured out the problem. It appears there is a bug should it fail to properly fetch the dvb-scan files but have dvbscan enabled.

Also if something went wrong I don't think it properly recovers, so its possible that something odd occurred previously.

Can you run the following script manually to see what happens:

./support/getmuxlist

and then make

unfortunately teh getmuxlist doesn't output anything nor does it properly deal with errors, something that I really should fix. That's probably wants happened here.

Adam

RE: Problem with MKBUNDLE during make - Added by virtual dj about 12 years ago

Adam Sutton wrote:

Can you run the following script manually to see what happens:

./support/getmuxlist

and then make

root@debian-armel:~/tvheadend/tvheadend# ./support/getmuxlist 
tar (grandchild): bzip2: Cannot exec: No such file or directory
tar (grandchild): Error is not recoverable: exiting now
tar: Child died with signal 13
tar: Error is not recoverable: exiting now
./support/getmuxlist: line 14: curl: command not found
tar (grandchild): bzip2: Cannot exec: No such file or directory
tar (grandchild): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
./support/getmuxlist: line 15: cd: dvb-apps*: No such file or directory
mv: cannot stat `./util/scan/*': No such file or directory

In my VM bzip2 and curl were actually not installed, so I first installed bzip2 and then re-run getmuxlist:
root@debian-armel:~/tvheadend/tvheadend# apt-get install bzip2
root@debian-armel:~/tvheadend/tvheadend# ./support/getmuxlist
< No output then... >
root@debian-armel:~/tvheadend/tvheadend# make

And it worked! :)
However curl is still not installed, is it OK anyway or are there other "hidden" errors?

Maybe you should include bzip2 as a prerequisite in configure script when using --enable-bundle.

RE: Problem with MKBUNDLE during make - Added by Adam Sutton about 12 years ago

The reason it didn't complain the second time is that the script will use either curl or (first) wget. I will look at adding bzip2 to the list of deps, I guess the issue is that while we try to consider everything sometimes we make assumptions about stuff that is almost always going to be installed.

Adam

RE: Problem with MKBUNDLE during make - Added by virtual dj about 12 years ago

Adam Sutton wrote:

sometimes we make assumptions about stuff that is almost always going to be installed.

That's true, but when you're compiling the application for lightweight systems (such as QNAP Busybox) normally nothing is installed by default and without any error message it's difficult to understand why it fails.

However that wasn't a problem, you've fixed my issue quickly so THANK YOU very much! :)

RE: Problem with MKBUNDLE during make - Added by Adam Sutton about 12 years ago

I wasn't saying the assumptions were correct ;) merely that we tend to assume certain things based on our experience, however I'm more than happy to fix stuff when people point out the in-correctness of those assumptions.

I have added bzip2 to the list of deps required to build, I've still not looked into adding to ./configure, but I will.

Adam

    (1-7/7)