thezbyg / gpick

Advanced color picker written in C++ using GTK+ toolkit
BSD 3-Clause "New" or "Revised" License
377 stars 33 forks source link

Cannot build gpick-0.2.4: error: css_grammar.c: No such file or directory #136

Open sdtemp-ml opened 8 years ago

sdtemp-ml commented 8 years ago

This will probably be low priority, but I thought I might as well log it:

I'm trying to build gpick on the now ancient Ubuntu 10.04. I'm building from git, with:

git checkout gpick-0.2.4

Most of the build process completes fine, but eventually I get this:

gpick_git$ scons
scons: Reading SConscript files ...
Checking for dbus-glib-1 >= 0.76... (cached) yes
Checking for gtk+-2.0 >= 2.12.0... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
buildAction(["build/source/cssparser/css_grammar.c", "build/source/cssparser/css_grammar.h"], ["source/cssparser/css_grammar.y", "source/cssparser/css_grammar.y"])
Copy("build/lempar.c", "extern/lempar.c")
Copy("build/source/cssparser/css_grammar.y", "source/cssparser/css_grammar.y")
sh: ../build/source/cssparser/css_grammar.y: Permission denied
Delete("build/source/cssparser/css_grammar.y")
Compiling ==> build/source/cssparser/css_grammar_wrap.o
source/cssparser/css_grammar_wrap.cpp:21:25: error: css_grammar.c: No such file or directory
scons: *** [build/source/cssparser/css_grammar_wrap.o] Error 1
scons: building terminated because of errors.

I tried doing:

cp source/cssparser/css_grammar.y build/source/cssparser/css_grammar.y

... since source/cssparser/css_grammar.y exists, however, the build seems to be overwritten each time, so this does not persist.

Any ideas how to get this to compile?

thezbyg commented 8 years ago

Looks like lemon parser generator is missing. Try running apt-get install lemon flex lexer will also be needed to generate other files. You may also have issues with version information generation, because version 0.2.4 used subversion for versioning. If Version.cpp file fails to compile, try modifying tools/gpick.py file by replacing GetVersionInfo function with the following:

def GetVersionInfo(self):
    self.Replace(GPICK_BUILD_REVISION = '',
        GPICK_BUILD_DATE =  time.strftime("%Y-%m-%d"),
        GPICK_BUILD_TIME =  time.strftime("%H:%M:%S"));