LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Unable to compile pommed on MBA 3,1 possibly libconfuse deps? Slackware 13.37 64bit (https://www.linuxquestions.org/questions/linux-software-2/unable-to-compile-pommed-on-mba-3-1-possibly-libconfuse-deps-slackware-13-37-64bit-935785/)

Fluxo 03-21-2012 07:57 PM

Unable to compile pommed on MBA 3,1 possibly libconfuse deps? Slackware 13.37 64bit
 
I am using a Macbook Air 2010 11in, and everything is working flawlessly, except for the initial compiling of pommed. (And of course, rebooting, but that's for Google search to tell me..) I am rather new to Slackware, so It *might* just be a noob issue, but you guys can further scrutinize the terminal output here ==> http://pastebin.com/ryUKfRyv
From what I have gleaned through further investigation, is that it could be a libconfuse dependency issue, although I'm not entirely sure, as I thought I had installed libconfuse correctly.
This is on Slackware 13.37 64bit
What is your take LQ?

Tinkster 03-21-2012 08:57 PM

Hi, welcome to LQ!

And have you tried to provide it with libconfuse? Chances are (not knowing
pommed or libconfuse) that this is what's causing the complaint.



Cheers,
Tink

Fluxo 03-21-2012 09:10 PM

Thanks Tinkster!
By saying "provide it with libconfuse", do you mean place the libconfuse source into the same directory as the pommed source?

Tinkster 03-21-2012 09:54 PM

I don't know how they hang together. Given the name libconfuse I'd assume it's
installed on the system somewhere, and then linked in at run-time. The problem is
that the compiler can't see it at compile time?


If it's installed it may not be in your ldpath ...

Fluxo 03-21-2012 11:10 PM

I attempted a re-install of libconfuse, and of course compiles and "make install"s correctly.
It appears to be going fine until I reboot, and pommed yet again refuses to compile, and my trackpad is all wonky.
I then uninstall it and things return to normal.
And might you elaborate on:
Quote:

If it's installed it may not be in your ldpath ...
Thanks a bunch :)

Dark_Helmet 03-22-2012 01:30 AM

I would bet a large sum of money that libconfuse isn't getting installed properly.

Just for reference: libconfuse. From the description on that page, libconfuse is a config-file-reading framework. Indeed, the errors you encountered after issuing make are encountered while trying to compile "pommed/conffile.c" for pommed. Further investigation shows that conffile.c uses a "#include <confuse.h>" and, therefore, relies on it.

And a little more poking around (this time in "pommed/Makefile") shows that the compilation issues two shell commands to give the necessary commands to the compiler and linker:
Code:

CONFUSE_CFLAGS = $(shell pkg-config libconfuse --cflags)
CONFUSE_LIBS = $(shell pkg-config libconfuse --libs)

Using pkg-config is commonplace for this kind of thing and the very first error is on-point. The pkg-config command reads "<packagename>.pc" files to get the above information. After you issued "make install" for libconfuse, a "libconfuse.pc" file should have been copied somewhere.

This would depend on whether you used any special flags when you configure'd/make'd the libconfuse package. On my system (Debian) there are lots of pc files in /usr/lib/pkgconfig and /usr/share/pkgconfig. Regardless, you need to locate the libconfuse.pc file. If you have no clue where it might be:
Code:

find / -iname "libconfuse.pc"
It's possible that command could take a long time to complete.

If it prints nothing, then libconfuse was not installed properly. You'll need to double-check the steps you used to install it.
EDIT:
If you used a package manager to install libconfuse, you need to install the equivalent "-dev" package as well. I don't know how Slackware handles packages--whether the development packages are separate or not. So, I'm just throwing that out there...
/EDIT

If it does print something, then you're getting somewhere.

Also, issue the following command:
Code:

echo $PKG_CONFIG_PATH
Post the result of the two previous commands and we'll go from there.

Fluxo 03-22-2012 08:59 AM

Here is the output: http://pastebin.com/Ly3v6Cw2
From what I could tell, it DID find it, but that might not be the case.. (Sorry about the Windows mess) And, btw, Slackware does have a basic package manager, but it can't resolve dependencies, hence the problems :P

Dark_Helmet 03-22-2012 10:51 AM

Yup. It found the installed copy at /usr/local/lib/pkgconfig/libconfuse.pc.

So, how about that second command? ;)
Code:

echo $PKG_CONFIG_PATH

Fluxo 03-22-2012 11:38 AM

Oh! My bad, here:
Code:

bash-4.1$ echo $PKG_CONFIG_PATH
/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig
bash-4.1$

Unsurprisingly, it appears to be there :p

Tinkster 03-22-2012 12:43 PM

Right. So the file exists, but it's not in the pkg_config_path (/usr/local/lib != /usr/locallib64 ).

And chances are that you won't find the actual library in the ld_path, either.
ldconfig - v|grep linconfuse

Dark_Helmet 03-22-2012 02:22 PM

Your immediate problem is caused by a failure of pkg-config in providing the necessary "-I" option to the compiler (to find support files). I say that because the errors you reported are complaining about lacking definitions for programming structures. Those definitions are contained in header files, header files are added to a program by "#include" statements in the code, and the compiler relies of "-I" options to locate "#include"'d header files. The "pkgconfig <package name> --cflags" command is responsible for providing the necessary "-I" options (and some others).

The ld problem Tinkster is getting at is also likely and issue, but I think that's one or two "onion layers" down. The easiest solution to the immediate problem is to add the directory to PKG_CONFIG_PATH.

Code:

export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig
cd <directory with source code>
make -C pommed

Some things to note:
1. PKG_CONFIG_PATH is a colon-separated list of directories that the pkg-config program will look for .pc files. Once you have updated PKG_CONFIG_PATH, the following command should give some output:
Code:

pkg-config libconfuse --cflags
2. Modifying PKG_CONFIG_PATH in a terminal is a temporary solution. It will change PKG_CONFIG_PATH for that terminal session only. A permanent change would require editing some of your system config files to add that directory (or others as necessary) to PKG_CONFIG_PATH at boot. For instance: /etc/profile

The problem Tinkster mentioned is an issue telling the linker (i.e. last stage of compiling) where the libconfuse library is located on the system. That can be adjusted with an environment variable (LD_LIBRARY_PATH) or system config files (/etc/ld.so.conf).

Fluxo 03-22-2012 08:32 PM

Dark_Helmet, your temporary solution appears to be working, but could you elaborate on how to add PKG_CONFIG_PATH on boot?
Thanks

EDIT: It compiles with the temporary fix, but attempting to start Pommed works only to an extent.. See here http://pastebin.com/CLz28zbk

Dark_Helmet 03-22-2012 09:09 PM

Without trying to confuse... you may not need to make it permanent.

The purpose of the pkg-config tool is to assist with the software compilation process. So, pkg-config's role in life starts--and ends--with software compilation. Once a piece of software is compiled, it no longer relies on pkg-config. You've compiled pommed, and it passes the "brain dead" test by actually doing something.

The reason you would want to make the PKG_CONFIG_PATH change permanent is if you have a need to compile software that uses libconfuse (or another library installed to a non-standard location) in the future (including re-compiling pommed).

If you decide to make it permanent, you need to edit one of the bash startup files that defines environment variables. You have two choices: a system-wide config file (usually /etc/profile) or a user-specific config file (usually ~/.bash_profile).

If you modify the system-wide file, the change will be available to all users. Conversely, the change will be visible to only a specific user if you decide on the user-specific route.

Basically, just add the export command I provided earlier to the bottom of the file, save, and exit. The next time you boot, issuing the "echo $PKG_CONFIG_PATH" command should show the expanded value.

Keep in mind that I said "the next time you boot" and not "the next time you open a terminal." Because of the way windowed/desktop sessions are managed, you'll need to re-login for the change to take effect. And for most folks, that's equivalent to "reboot."

As for the output you posted coming from pommed, that just looks like the "beep" portion of the program failed to start because the program could not find the /usr/share/pommed/goutte.wav file. Aside from that, the beginning of the output seems to indicate you need to create a configuration file if you want something other than defaults. I can't be anymore specific because I don't use pommed primarily because I don't own a Mac :)

Though, you should be able to find information about what to do next with the pommed website (if there is one) or the man pages. I would assume "man pommed" would come up with something.

Fluxo 03-23-2012 08:53 PM

I really appreciate the help you two, thanks a bunch!
I might be back with something else I'm curious about :p

May the schwartz be with you


All times are GMT -5. The time now is 08:30 PM.