You are not logged in.
I'm trying to get links-hacked to compile. Here's my PKGBUILD:
pkgname=links-hacked
pkgver=030709
pkgrel=1
pkgdesc="An enhanced version of links with support for tabs"
pkgurl="http://xray.sai.msu.ru/~karpov/links-hacked/"
url="http://xray.sai.msu.ru/~karpov/links-hacked/"
source=(http://xray.sai.msu.ru/~karpov/$pkgname/downloads/$pkgname-$pkgver.tgz http://xray.sai.msu.ru/~karpov/links-hacked/downloads/links-fonts-new.tgz)
depends=('openssl' 'x-server')
md5sums=(74fb710ecfa89aceb51211f7dce24ab0 1176ee9132c9df8c1ec955e28bff6f5b)
conflicts=(links)
build() {
cd $startdir/src/$pkgname-$pkgver/
mv ../font ./
./autogen.sh
./configure --prefix=/usr --enable-ssl --enable-javascript --enable-graphics
make || return 1
make prefix=$startdir/pkg/usr install
}
However, compilation fails with this:
if gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -I/usr/X11R6/include -O2 -march=pentium2 -mmmx -fomit-frame-pointer -mtune=pentium2 -pipe -I/usr/include/freetype2 -MT options.o -MD -MP -MF ".deps/options.Tpo" -c -o options.o options.c;
then mv -f ".deps/options.Tpo" ".deps/options.Po"; else rm -f ".deps/options.Tpo"; exit 1; fi
options.c: In function `load_options':
options.c:264: error: label at end of compound statement
make[2]: *** [options.o] Error 1
make[2]: Leaving directory `/var/abs/local/links-hacked/src/links-hacked-030709'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/abs/local/links-hacked/src/links-hacked-030709'
make: *** [all] Error 2
==> ERROR: Build Failed. Aborting...
Any suggestions?
PS It appears that the website for links-hacked is down, so I'll try to upload the source to my own webspace.
"To be a Spartan is to be a philosopher much more than to be an athlete."
Plato, the <i>Protagoras</i>, 342e-343a
Offline
Here's the source files: http://www.msu.edu/~vande198/links-hacked-030709.tgz
and
http://www.msu.edu/~vande198/links-fonts-new.tgz
"To be a Spartan is to be a philosopher much more than to be an athlete."
Plato, the <i>Protagoras</i>, 342e-343a
Offline
do me a favor and check +-5 lines at:
options.c: In function `load_options':
options.c:264: error: label at end of compound statement
I'm going to assume there's an ifdef block to remove some borked code... *shrug*
Offline
do me a favor and check +-5 lines at:
options.c: In function `load_options': options.c:264: error: label at end of compound statement
I'm going to assume there's an ifdef block to remove some borked code... *shrug*
probably it is a switch/case issue, where the last case is left open which has been allowd until gcc-3.4. Search for a thing like
blah:
and add an empty command (read: just add a semicolon) and it should work.
Crystalball says, it's the "default:" case which is not closed.
-neri
Offline
if it's the last default: case, just close it with a neat "break;" instruction.
Offline
I don't know quite where to put that "break;" Here are the two instances of the pattern "load_options" in options.c:
void load_options()
{
FILE *f;
unsigned char *options_file = stracpy (links_home);
if (!options_file)
goto load_failure;
add_to_strn(&options_file, "options");
f = fopen(options_file, "r");
mem_free(options_file);
if (!f){
goto load_failure;
}
while(!feof(f)){
unsigned char *tmp=mem_alloc(MAX_STR_LEN);
unsigned char *name=mem_alloc(MAX_STR_LEN);
unsigned char *value=tmp;
unsigned char *vvv;
if(fgets(tmp,MAX_STR_LEN,f)){
/* Very ugly realization of option string parsing --karpov */
sscanf(tmp,"%s",name);
while(*value!='"')
value++;
value++;
vvv=value;
while((*vvv!='"')||
(*vvv=='"' &&
*(vvv-1)=='\')) vvv++;
*vvv='';
options_set(name,value);
}
mem_free(tmp);
mem_free(name);
}
fclose(f);
return;
load_failure:
/* internal("Can't load options!n"); */
}
and
void init_options()
{
register_options();
load_options();
}
I'm a bit of a novice when it comes to writing any code other than bash scripts.
"To be a Spartan is to be a philosopher much more than to be an athlete."
Plato, the <i>Protagoras</i>, 342e-343a
Offline