#106 fbpanel: can't load space plugin, etc

6.1
open
nobody
None
5
2012-03-19
2012-03-19
Mike Manes
No

fbpanel-6.1
gtk+-2.22.1
never got to build a config file

fbpanel appeared to compile and install wirhout error, but when started it could not load any plugins. The problem was traced to the following lines of rules.mk in the top directory:

T := $(subst $(TOPDIR)/,,$(CURDIR)/)
T := $(subst /, ,$(T))
T := $(firstword $(T))
ifeq ($(T),plugins)
CFLAGSX += -DPLUGIN
endif

When I first started with linux, I built packages from source in /usr/src/WORK. I later moved the source and work directory into /home/usr/src and created a symbolic link /usr/src -> /home/usr/src. This means there are 2 different paths to the directory where I unpacked, configured and compiled fbpanel:

/home/usr/src/WORK (physical)
/usr/src/WORK (symbolic link)

TOPDIR is set by the line in "configure": add_var topdir "project's top directory" '`pwd`'. If (as I nearly always do) I get to the WORK directory by "cd /usr/src/WORK" then TOPDIR=/usr/src/WORK/fbpanel-6.1

CURDIR is set by make using the "getcwd" function which always ignores symbolic links. This while in the top fbpanel directory CURDIR=/home/usr/src/WORK/fbpanel-6.1

At the comparison with "plugins" T=homeplugins. Make never realizes it is in the plugins directory, PLUGIN is not defined, the class_register function is not added to the constructor in plugin.h, the plugins are never registered and cannot be found in class_ht and fbpanel posts a bunch of errors.

The fix I used was the change to "configure":

-add_var topdir "project's top directory" '`pwd`'
+add_var topdir "project's top directory" '`pwd -P`'

Discussion


Log in to post a comment.