On 2009-04-26, Pau <[email protected]> wrote: > Hello, > >> $ cd /usr/ports/lang/gcc/4.2 >> $ FLAVOR="c++ fortran objc" make > > thanks, it's compiling now... But... what is that supposed to do, > compared to simply "make"? Can you please elaborate a bit? What kind > (flavour) of gcc42 will I be "left with"? Remind that this is > "newbies" and not misc (this was the reason for posting here, because > I assumed there would be too many basic things to ask), and even if I > have been using openbsd for everything for three years already, there > are many things I still do not understand. "I am not a technician", I > am a Physicist, but I do not put this forward as a (ridiculous) > argument, I want to know and understand.
The FLAVOR influences how a port is built; sometimes to choose between alternative versions which can't be built together (for example, in bacula you can choose between different mutually-exclusive databases), other times to add non-standard patches (as in mutt with various patches like the sidebar), and others to prevent parts from being built (e.g. here in gcc 4, or php5/extensions). You can of course find these in the port's Makefile or files it pulls in (sometimes you also need to consult Makefile.inc in the parent directory), but there's an easier way to see the list of possible flavors: $ make show=FLAVORS c++ fortran objc java ada and also the list of default flavors on an i386 machine: $ make show=FLAVOR c++ fortran objc ada setting other variables can affect the "make show" output; a simple but pointless example: $ FLAVOR="c++ fortran" make show=FLAVOR c++ fortran or we can pretend we have an amd64 and show the list of default flavors there: $ MACHINE_ARCH=amd64 make show=FLAVOR c++ fortran objc (as you can see here; the ada bootstrap we're having problems with here is for i386 only; it's not built on amd64). On 2009-04-26, Pau <[email protected]> wrote: > something's broken.... > > I installed it with your FLAVOR and then went to > /usr/ports/editors/openoffice3 and... look below Aha; an opportunity to explain a bit about sub-packages too :-) they're related but different to FLAVORs. If you have software which builds a large set of files, and it's common for users not to need all of them, the port can build the whole lot, and produce separate packages from this. Here it's the C compiler, C++ compiler, standard C++ library, Fortran compiler, Ada compiler, and Objective C compiler. Let's take a look at some files in some of the PLISTs here: $ cd /usr/ports/lang/gcc/4.2; grep bin/ pkg/PLIST-{main,c++,f95} pkg/PLIST-main:@bin bin/ecpp pkg/PLIST-main:@bin bin/egcc pkg/PLIST-main:bin/egccbug pkg/PLIST-main:@bin bin/egcov pkg/PLIST-main:@bin bin/${CONFIG}-egcc pkg/PLIST-main:@bin bin/${CONFIG}-gcc-${V} pkg/PLIST-c++:@bin bin/ec++ pkg/PLIST-c++:@bin bin/eg++ pkg/PLIST-c++:@bin bin/${CONFIG}-ec++ pkg/PLIST-c++:@bin bin/${CONFIG}-eg++ pkg/PLIST-f95:@bin bin/egfortran pkg/PLIST-f95:@bin bin/${CONFIG}-egfortran So at the packaging stage (where the /usr/ports/packages/ARCH/all/*.tgz files are produced), you get a subset of files in each package, according to the packing list (pkg/PLIST* and pkg/PFRAG* files). This probably isn't the simplest port to demonstrate with, but not too bad; the FLAVOR affects the set of files produced - this port doesn't bother building the Fortran compiler unless the FLAVOR is set appropriately, and it removes -f95 from the list of sub-packages to build *.tgz for. $ make show=MULTI_PACKAGES -main -c++ -estdc -f95 -objc -ada $ FLAVOR="c++ objc" make show=MULTI_PACKAGES -main -c++ -estdc -objc We wanted to remove the Ada compiler because it requires a pre-built version of the Ada compiler to "bootstrap" from and we don't have the right libraries to do that; so you can set the FLAVOR how I showed earlier and check which packages will be built. >===> openoffice-3.0.1p2 depends on: gcc-* - found >===> openoffice-3.0.1p2 depends on: g++-* - not found >===> Verifying install for g++-* in lang/gcc/4.2 so, it found the "gcc" subpackage, the C compiler, but not the "g++" subpackage. But you already built it; it's there in /usr/ports/packages. What happened is the "make install" target just installs one of the subpackages, not the whole lot. You can either "make install-all" for everything you built, or you manually pkg_add the package you just built: # PKG_PATH=/usr/ports/packages/i386/all/ pkg_add g++ (When you "make install" in the OpenBSD ports tree, it always builds a package, then pkg_add's it. Some other OS do this the other way round; they install under the live system, then "make package" is an optional later step e.g. if you want to move the package to a different machine without rebuilding). When openoffice is trying to install g++ as a dependency, it doesn't know about /usr/ports/packages, it uses the ports tree to attempt the installation - and it doesn't know anything about gcc's FLAVOR, so it attempts to re-build the whole lot of gcc, which fails for the original reason. > I think I will wait for the gcc4.2 binary and then try again. I want > to compile openoffice on my own because i hope to get some speeding up > factor... probably I could get it by compiling rather than installing > the binary from an ftp srver... The binary packages on ftp are built in exactly the same way as packages you build yourself from ports; unless you adjust compiler optimization flags (which except in special circumstances will waste more of your time than it saves at runtime), there should be no difference at all between the package you make via ports, and the packages made in the bulk builds for the ftp servers. _______________________________________________ Openbsd-newbies mailing list [email protected] http://mailman.theapt.org/listinfo/openbsd-newbies
