This is the old SliTaz forum - Please use the main

What are "BuildDepends" and where are they?
  • slicelslicel March 2011
    What are "BuildDepends" and where are they?

    Searching a blank field in that category on the packages page returns no results.

    Thank you

  • slicelslicel March 2011
    That you but that cookbook page refers to BUILD_DEPENDS as "dev" packages while "dev" returns no results in the "Build depends" search page so these might be different things with similar names.

    "No package dev"
  • seawolfseawolf March 2011
    They are packages needed to compile/build that program/package, so usually the *-dev packages associated with it's usual dependencies.
  • slicelslicel March 2011
    The "ncurses-dev" is not a "Build depends" of "ncurses" here-

    The "ncurses-dev" is a "BUILD_DEPENDS" of "ncurses" here-

    Either one of the pages is wrong or they are not the same build depends.

    The search page does not tell you this but it looks like you cannot search a blank field, cannot search a partial name, cannot use a * wildcard, and the names are case sensitive.

    I was asking about the "Build depends" on the search page, in case it is different from "BUILD_DEPENDS" in the cookbook.

    Thank you

  • Trixar_zaTrixar_za March 2011
    No, you're understanding of the concept is wrong. You're confusing compiling a program or library and compiling something against a program or library.

    Let me explain it this way. I want to compile ncurses. So to do that I download the source code, extract it, check the README or INSTALL file for the dependacies I may need to compile it, install those and their -dev libraries and do the good old ./configure, make and make install. Now I have ncurses compiled and ready to go. Doing so also installed several libraries and headers to my system.

    Wait what is headers, you ask? Well, headers, to put it simply, is just a list of what the library or program can do (It's more complicated than that, but let's stick to simple). Now if you want to compile something that's depended on that library or program, you need the headers so you can access all the functions in the library or program it need. Now dev packages are basically just packages that contain these headers files. That's why if you compile ncurses manually, it WON'T need ncurses-dev as it's Build Depends, since ncurses already provides those headers concerning itself with it's source code.

    Now say I want to compile a program, but it lists ncurses as a build depends. Guess what? Yep, I need to get ncurses-dev so I can get those header files so it will compile properly because without it the program (and compiler) won't know how to use ncurses properly.

    I can already sense your next questions:
    1. Why doesn't compiled programs need headers then?
    Because during compiling the functions that the program needs from the dependency gets 'linked" in (compiled into) the compiled program. So after a program is compiled, it knows how to use the dependency independently.

    2. Why don't we just leave the headers with the programs?

    Because headers are part of the source code, take up space and aren't used again except when compiling programs that need them again.

    Oh and to answer your question about being unable to find them. Have you considered just searching for dev without any * or - ? Works wonders for the online package search and tazpkg search.

    Yes, this is hard to explain to a non-coder. If you ever coded something in C or C++, then this question wouldn't have come up...
  • marquiticomarquitico March 2011
    For compiling from source, I started calling the dev files "includes" instead, just so I wouldn't confuse myself, heh. As in:
    #include <stdio.h>
  • Trixar_zaTrixar_za March 2011
    Lol, yeah. It's weird when you learn it the first time. Programmers call it headers, which is why it ends with .h and it lists all the 'heads' of program functions in them. Hence the name. They also need to be included so you can access those functions. Mind you, it's fun learning C or C++ just for the sake of writing quick and fast programs ;)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership


SliTaz Social