Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: help building flac (Read 2102 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

help building flac

i have not done this before, so i am not sure if everything went fine while building flac under mint.


what i have done actually is:

downloaded and unpacked latest tar.xz

make sure autoconf and libtool are installed for building

open up a terminal and enter: ./configure

>>> a config summary showed up

next i entered: make

in the terminal the compiling process started, which took about one minute


now if i understood correctly, freshly created flac & metaflac compiles should be found in /scr/flac subfolder, but that is not the fact.

am i missing a step?

Re: help building flac

Reply #1
sudo make install
...provided there were no error during compiling.
Error 404; signature server not available.

Re: help building flac

Reply #2
hm, so these 2 files (flac, metaflac) are only created after installing?

no chance to check them out in first place (after the make-process)?

Re: help building flac

Reply #3
No, the flac and meteflac binaries should be created during the make.  metaflac itself would be in src/metaflac/.libs.  .libs is a standard build location for object and binary files.  You can execute a binary directly from there, or from anywhere really, but often you will use make install to move all your binaries and objects to standard system locations.  make install will take care of setting up any associated library objects in the right locations, which is usually necessary, although you might already have libFLAC installed or you might have compiled a static binary that doesn't require libraries.

P.S.  That applies to Linux, but you may be in Windows?  I think everything goes into src/metaflac/objs on Windows.

Re: help building flac

Reply #4
it is all there, ha!

i did not look for hidden .libs folders, that's all. thank you so much.


but now i am facing another problem. when running the 1.3.1 flac binary i get this terminal output:

flac - Command-line FLAC encoder/decoder version 1.3.0
Copyright (C) 2000-2009  Josh Coalson
Copyright (C) 2011-2014  Xiph.Org Foundation

downloaded from here: downloads.xiph.org/releases/flac/flac-1.3.1.tar.xz

any ideas?

Re: help building flac

Reply #5
@sanskrit44 : To launch a locally build file on linux, you need to explicitely say so.

I.e. : you either need to append ./ , or use the full path:

$> ./mylocalexe
$> /users/mine/builds/mylocal/mylocalexe

Also, depending on how you build it, your build might still use the library installed on your system instead of the one located in the build dir.

IIRC, that can be solved setting the LD_LIBRARY_PATH, but It's been a long time since I've done any serious building on linux to be exact on that

Re: help building flac

Reply #6
@jaz: sure, i know. of course i ran ./flac in binary folder.

Re: help building flac

Reply #7
You are executing the wrong binary.

Code: [Select]
which flac # will search in $PATH, typically /usr/local/bin, /usr/bin ... make install usually installs into /usr/local if you didn't change ./configure --prefix ...
which ./flac # in the directory where the compiled binary is
should show different output.
"I hear it when I see it."

Re: help building flac

Reply #8
@xnor: i did not make install

just to be sure i entered in terminal (where my new bin is located):

/home/my-user-name/flac-1.3.1/flac

   
flac - Command-line FLAC encoder/decoder version 1.3.0
Copyright (C) 2000-2009  Josh Coalson
Copyright (C) 2011-2014  Xiph.Org Foundation

perhaps someone can confirm this?

Re: help building flac

Reply #9
As [JAZ] wrote, "depending on how you build it, your build might still use the library installed on your system instead of the one located in the build dir".

Re: help building flac

Reply #10
@lvqcl: ok, i see. but i followed the standard process in flacs readme, no extra options are taken (at least something that important should be explained in detail on top).

   
maybe you are willing to do a quick test compile and proof me wrong?

see:

downloads.xiph.org/releases/flac/flac-1.3.1.tar.xz
   
merci

Re: help building flac

Reply #11
But the standard process assumes that you make install and that you don't already have an old version installed...
"I hear it when I see it."

Re: help building flac

Reply #12
from the README file:
Quote
FLAC uses autoconf and libtool for configuring and building.
Better documentation for these will be forthcoming, but in
general, this should work:

./configure && make && make check && make install

The 'make check' step is optional
(emphasis is mine).

Re: help building flac

Reply #13
On Jessie with ./configure && make I get;
Code: [Select]
src/flac/flac
which says
Code: [Select]
1.3.1
(And there is also flac installed from repos which says 1.3.0)

p.s. On Arch, flac says 1.3.1 so I don't configure/make :P
PANIC: CPU 1: Cache Error (unrecoverable - dcache data) Eframe = 0x90000000208cf3b8
NOTICE - cpu 0 didn't dump TLB, may be hung

Re: help building flac

Reply #14
If you have existing flac libraries installed and you don't want to do make install (which would overwrite them), you might find it simpler to build a static binary.  The binary will be bigger, but you won't have to worry about configuring which libraries it is going to use.  You can do this with an option to configure.

Re: help building flac

Reply #15
(And there is also flac installed from repos which says 1.3.0)

p.s. On Arch, flac says 1.3.1 so I don't configure/make :P
thank you for letting me know. when you can compile with 1.3.0 installed and did not select any extra options, i should be able to do that under mint as well, i guess.

this is my config summary. i am not sure if the 1.3.1 version already implies a final 1.3.1 build as well?
   
   
Configuration summary :

    FLAC version : ........................ 1.3.1

    Host CPU : ............................ x86_64
    Host Vendor : ......................... unknown
    Host OS : ............................. linux-gnu

    Compiler is GCC : ..................... yes
    GCC version : ......................... 4.8
    Compiler is Clang : ................... no
    SSE optimizations : ................... yes
    Asm optimizations : ................... yes
    Ogg/FLAC support : .................... no   


besides: it is getting even more bizarre - i have downloaded this compile for mint for testing purpose, unpacked it and executed the flac bin. again i see 1.3.0? installing it makes no difference at all.
   
   
@lithopsian: well, that would be an option, unless someone is willing to show me how to do this in detail ;)

Re: help building flac

Reply #16
Most packages are compiled with shared libraries.
That means that there is an executable (flac) and a library (libflac). Distributions even split those, so that you don't need to install the flac package when some application just depends on libflac. So even if you uninstall flac it could leave a libflac package behind.

Now, running the executable will try to load the shared library in the default places (usually /lib and /usr/lib) if you didn't specify LD_LIBRARY_PATH.
So whatever executable you run, as long as it is compatible, it will typically load the installed system libFLAC.so.whatever-version.


So the easiest would be to set LD_LIBRARY_PATH to wherever your new complied library is.
"I hear it when I see it."

Re: help building flac

Reply #17
Code: [Select]
sudo aptitude install flac
dpkg -l "*flac*"

Output:
Code: [Select]
||/ Name                          Version             Architecture        Description
+++-=============================-===================-===================-===============================================================
ii  flac                          1.3.0-3             amd64               Free Lossless Audio Codec - command line tools
ii  libflac8:amd64                1.3.0-3             amd64               Free Lossless Audio Codec - runtime C library

Code: [Select]
wget "http://downloads.xiph.org/releases/flac/flac-1.3.1.tar.xz"
tar xf flac-1.3.1.tar.xz
cd flac-1.3.1/
./configure && make
flac -v # ==> flac 1.3.0
src/flac/.libs/flac -v # ==> flac 1.3.0

# lets check what is going on:
ldd src/flac/.libs/flac # as expected ==> libFLAC.so.8 => /usr/lib/x86_64-linux-gnu/libFLAC.so.8 (0x00007fce4ffc6000)

# now we want it to load our freshly complied library instead
LD_LIBRARY_PATH=src/libFLAC/.libs/ src/flac/.libs/flac -v # ==> flac 1.3.1
# check
LD_LIBRARY_PATH=src/libFLAC/.libs/ ldd src/flac/.libs/flac # ==> libFLAC.so.8 => src/libFLAC/.libs/libFLAC.so.8 (0x00007fc1fa598000)


And we can also install:
Code: [Select]
sudo make install # installs to /usr/local by default
flac -v # ===> flac 1.3.0
sudo ldconfig # update shared library cache. this will only work if your ld.conf somewhere includes /usr/local/lib
flac -v # ===> flac 1.3.1


If you have a debian system then simply grab the latest source package, build it which should result in two .debs and install both with dpkg -i "*flac*.deb".
"I hear it when I see it."

 
SimplePortal 1.0.0 RC1 © 2008-2021