FIXED: How to complete an incremental build?

*nix specific usage questions
xyz000
Blank Cone
Blank Cone
Posts: 27
Joined: 08 Jun 2009 09:33

FIXED: How to complete an incremental build?

Postby xyz000 » 23 Jun 2009 13:16

If I make a small change to a source file, say I modify <vlc>/extras/contrib/src/<path>/<file.c> then what steps should I take to rebuild the vlc binary?!?

I've tried running "make" from <vlc>/extras/contrib but it claims there is nothing to make

I can get a library to rebuild if I run "make" from <vlc>/extras/contrib/<path> but then running "make" from <vlc> also claims there is nothing to make.

I'm missing something here about the source / library dependencies. Can anyone help please?

Thanks!
Last edited by xyz000 on 24 Jun 2009 12:27, edited 2 times in total.

xtophe
Big Cone-huna
Big Cone-huna
Posts: 1209
Joined: 24 Nov 2003 10:12
Location: Bristol, England

Re: How to complete an incremental build?

Postby xtophe » 23 Jun 2009 14:12

extras/contrib/* is not vlc !

It's just a mean to get the third party libraries on OS/Distros which sucks.

So the Makefile is quite simple and only see if the libs have been compiled or not.

So if you make changes you need to force the build with rm -f .libfoo && make .libfoo
Xtophe

xyz000
Blank Cone
Blank Cone
Posts: 27
Joined: 08 Jun 2009 09:33

Re: How to complete an incremental build?

Postby xyz000 » 23 Jun 2009 15:46

I must apologise for still feeling like an idiot but I can't yet make your instructions works. Can you talk me through a trivial example please? Suppose I want to rebuild libmpeg2 by making a change to mpeg2dec.c. In the example below I've shown "touch" to mimic updating a source file.

Code: Select all

$ pwd /path/to/vlc-1.0.0-rc3 $ touch extras/contrib/src/libmpeg2/src/mpeg2dec.c $ find . -name libmpeg2.a ./extras/contrib/src/libmpeg2.a ./extras/contrib/src/libmpeg2/libmpeg2/.libs/libmpeg2.a $ rm -f .libmpeg2 && make .libmpeg2 make: *** No rule to make target '.libmpeg2'. Stop.
The only way I get libmpeg2 to build is:

Code: Select all

$ cd extras/contrib/src/libmpeg2 $ pwd /path/to/vlc-1.0.0-rc3/extras/contrib/src/libmpeg2 $ make [...and off it goes...]
...but I still can't get VLC's Makefile to realise the lib has been updated...

Code: Select all

$ cd ../../../.. $ pwd /path/to/vlc-1.0.0-rc3 $ make [...lots of "Nothing to be done" messages...]
What step(s) am I missing?

Rémi Denis-Courmont
Developer
Developer
Posts: 15228
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: How to complete an incremental build?

Postby Rémi Denis-Courmont » 23 Jun 2009 17:48

If you want to incrementally build libmpeg2, then incrementally build LIBMPEG2 from its own source code, not VLC.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

xyz000
Blank Cone
Blank Cone
Posts: 27
Joined: 08 Jun 2009 09:33

Re: How to complete an incremental build?

Postby xyz000 » 23 Jun 2009 18:09

incrementally build LIBMPEG2 from its own source code
OK. That's what I tried to describe in the middle part of the previous post. I hope you don't mind if I ask one more question;

Once I've built an updated lib in extras/contrib ... how do I make the VLC Makefile(s) "see" that the lib has updated? I think what I'm trying to achieve is to update the vlccore lib by re-linking against the updated lib(s) in extras/contrib?

xyz000
Blank Cone
Blank Cone
Posts: 27
Joined: 08 Jun 2009 09:33

Re: How to complete an incremental build?

Postby xyz000 » 24 Jun 2009 12:25

I now understand what I was doing wrong. The critical depencies are the hidden files in extras/contrib/src. The previous suggested solution was:
...you need to force the build with rm -f .libfoo && make .libfoo
When I looked at the hidden files in extras/contib/src I figured that "libfoo" has a hidden file called ".foo" rather than a hidden file called ".libfoo". So here's my example of how to incrementally build VLC based on, say, a change to libmpeg2. First rebuild the library from extras/contrib/src:

Code: Select all

$ pwd /path/to/vlc $ cd extras/contrib/src $ rm -f .mpeg2 && make
Then rebuild VLC based on the updated library:

Code: Select all

$ pwd /path/to/vlc $ make
Job done. There might be a more efficient solution but at least this works for me.


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 2 guests