Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 104089 - www-client/links-2.1_pre18 fails to compile due to non-existent structure member function names
Summary: www-client/links-2.1_pre18 fails to compile due to non-existent structure mem...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Marcelo Goes (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-28 20:28 UTC by Chris Slycord
Modified: 2005-08-29 08:06 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
The output from "emerge links" (ouput,40.32 KB, application/octet-stream)
2005-08-28 20:29 UTC, Chris Slycord
Details
Output of "emerge info" (info,2.18 KB, application/octet-stream)
2005-08-28 20:30 UTC, Chris Slycord
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Slycord 2005-08-28 20:28:46 UTC
Upon attempting to emerge links-2.1_pre18 an error ocurred eventually and this
was displayed:

i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/SDL
-D_REENTRANT  -march=athlon-xp -mtune=athlon-xp -pipe -O3 -fweb
-frename-registers -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer
-ftracer -c view.c
In file included from /usr/include/png.h:363,
                 from links.h:144,
                 from view.c:6:
/usr/include/pngconf.h:307:2: warning: #warning __png.h__ already includes setjmp.h;
/usr/include/pngconf.h:308:2: warning: #warning __dont__ include it again.;
view.c: In function `send_to_frame':
view.c:2978: error: structure has no member named `keydown_code'
view.c:2980: error: structure has no member named `keydown_code'
view.c:2982: error: structure has no member named `keypress_code'
view.c:2984: error: structure has no member named `keypress_code'
view.c:2987: error: structure has no member named `keydown_code'
view.c:2989: error: structure has no member named `keydown_code'
view.c:2991: error: structure has no member named `keypress_code'
view.c:2993: error: structure has no member named `keypress_code'
make: *** [view.o] Error 1

Reproducible: Always
Steps to Reproduce:
1. As root run either:
      a. emerge =www-client/links-2.1_pre18
      b. emerge links (assuming you have ~keyword)
2.
3.

Actual Results:  
Package fails to compile, giving errors about a sturcture in a source code file
having incorrect member names.

Expected Results:  
Package to compile and install.
Comment 1 Chris Slycord 2005-08-28 20:29:55 UTC
Created attachment 67129 [details]
The output from "emerge links"
Comment 2 Chris Slycord 2005-08-28 20:30:29 UTC
Created attachment 67130 [details]
Output of "emerge info"
Comment 3 Rincewind 2005-08-28 21:15:02 UTC
same for me
Comment 4 John Berry 2005-08-28 23:56:39 UTC
I can't emerge links-2.1_pre18 too, but I have an other error :

/usr/include/pngconf.h:308:2: attention : #warning __dont__ include it again.;
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/directfb
-D_REENTRANT -I/usr/include/SDL -D_REENTRANT  -march=pentium-m -mtune=pentium-m
-O3 -pipe -fomit-frame-pointer -ftracer -c imgcache.c
Dans le fichier inclus 
Comment 5 John Berry 2005-08-28 23:56:39 UTC
I can't emerge links-2.1_pre18 too, but I have an other error :

/usr/include/pngconf.h:308:2: attention : #warning __dont__ include it again.;
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/directfb
-D_REENTRANT -I/usr/include/SDL -D_REENTRANT  -march=pentium-m -mtune=pentium-m
-O3 -pipe -fomit-frame-pointer -ftracer -c imgcache.c
Dans le fichier inclus à partir de /usr/include/png.h:363,
          à partir de links.h:144,
          à partir de imgcache.c:11:
/usr/include/pngconf.h:307:2: attention : #warning __png.h__ already includes
setjmp.h;
/usr/include/pngconf.h:308:2: attention : #warning __dont__ include it again.;
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/directfb
-D_REENTRANT -I/usr/include/SDL -D_REENTRANT  -march=pentium-m -mtune=pentium-m
-O3 -pipe -fomit-frame-pointer -ftracer -c ipret.c
Dans le fichier inclus à partir de /usr/include/png.h:363,
          à partir de links.h:144,
          à partir de struct.h:6,
          à partir de ipret.c:24:
/usr/include/pngconf.h:307:2: attention : #warning __png.h__ already includes
setjmp.h;
/usr/include/pngconf.h:308:2: attention : #warning __dont__ include it again.;
ipret.c: In function `mojeinv':
ipret.c:254: erreur interne du compilateur: dans try_split, à emit-rtl.c:3343
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
Preprocessed source stored into
/var/tmp/portage/links-2.1_pre18/temp/ccK2ddwV.out file, please attach this to
your bugreport.
make: *** [ipret.o] Erreur 1
make: *** Attente des tâches non terminées....
Dans le fichier inclus à partir de /usr/include/png.h:363,
          à partir de links.h:144,
          à partir de html_tbl.c:7:
/usr/include/pngconf.h:307:2: attention : #warning __png.h__ already includes
setjmp.h;
/usr/include/pngconf.h:308:2: attention : #warning __dont__ include it again.;

!!! ERROR: www-client/links-2.1_pre18 failed.
!!! Function src_compile, Line 114, Exitcode 2

emerge info:

Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r1,
2.6.12-gentoo-r9 i686)
=================================================================
System uname: 2.6.12-gentoo-r9 i686 Intel(R) Pentium(R) M processor 1600MHz
Gentoo Base System version 1.6.13
ccache version 2.4 [enabled]
dev-lang/python:     2.3.4-r1, 2.4.1-r1
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium-m -mtune=pentium-m -O3 -pipe -fomit-frame-pointer -ftracer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/texmf/web2c
/etc/env.d"
CXXFLAGS="-march=pentium-m -mtune=pentium-m -O3 -pipe -fomit-frame-pointer -ftracer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo
http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="fr_FR.UTF-8"
LC_ALL="fr_FR.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="fr_FR fr en en_US"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="x86 7zip X X509 Xaw3d a52 aac acl acpi activefilter ada aim alsa aotuv
apache2 apm arts athena atlas atm auctex avi bash-completion berkdb bitmap-fonts
blas blender-game bluetooth bzip2 calendar cardbus ccache cdparanoia cdr chroot
cjk clamav crypt css cups curl curlwrappers dba dbm dbx dhcp dio directfb
divx4linux dlloader dnd dnsdb doc dts dv dvd dvdr ecc emacs emacs-w3 emboss
encode esd ethereal examples exif exiscan-acl fam fastcgi fat fbcon fftw fmod
font-server foomaticdb fortran ftp gd gdbm geoip gif gimp gimpprint ginac glut
gnokii gnuplot gnustep gnutls gpgme gphoto2 gpm gsnd gtk gtk2 hardened
hardenedphp icq icu idn ieee1394 imagemagick imap imlib innodb iodbc ipv6
ithreads j2ee jabber jai java javascript jboss jce jfs jikes jit jpeg junit kde
kerberos kqemu krb4 lcms ldap libclamav libg++ libwww lzo mad mcal memlimit
mikmod mime mmx mono motif mozsvg mp3 mpeg msn mule mysql mysqli ncurses neXt
nis nls nntp nptl nptlonly ntlm oav objc odbc ogg oggvorbis openal opengl oscar
oss pam pam_timestamp pcmcia pcntl pcre pda pdfkit pdflib perl pg-hier php pic
png pnp posix postgres povray prelude profile python qt quicktime quotas radius
readline reiserfs samba scanner sdl server session sguil sharedext simplexml
skey slang slp smartcard smime soap sockets socks5 softmmu softquota spell spl
sql sqlite sse sse2 ssl subversion symlink sysfs szip tcltk tcpd tetex threads
tiff tokenizer truetype truetype-fonts trusted type1-fonts unicode usb
userlocales v4l vorbis wifi wxwindows xface xine xml2 xmlrpc xmms xpm xsl xv
xvid yahoo zlib linguas_fr_FR linguas_fr linguas_en linguas_en_US userland_GNU
kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET
Comment 6 Michael Baer 2005-08-29 02:18:09 UTC
It's the revenge of the javascript-fanatics ;-)

Seriously: Recompile it with javascript enabled and it will work.

-----------------------------------------------------------------------
USE="javascript" emerge =www-client/links-2.1_pre18
-----------------------------------------------------------------------

Demonstration
-------------
The errormessage is:
----------------------------------------------------------------------
view.c:2978: error: structure has no member named `keydown_code'
----------------------------------------------------------------------

Lines around 2978 in sourcefile view.c looks like:
----------------------------------------------------------------------
                struct link *l = &fd->f_data->links[fd->vs->current_link];
                if (ev->b < EVH_LINK_KEYDOWN_PROCESSED && l->js_event &&
l->js_event->keydown_code) {
                        ev->b = EVH_LINK_KEYDOWN_PROCESSED;
----------------------------------------------------------------------

So, the variable "l" should contain a memeber "js_event" and this memeber should
contain the memeber "keydown_code".

The variable "l" is of struct-type link.

The problem is struct "link".

Open file "links.h" and search for the struct "link". This struct looks like:

-----------------------------------------------------------------------
struct link {
        int type;   /* one of L_XXX constants */
        int num;    /* link number (used when user turns on link numbering) */
        unsigned char *where;   /* URL of the link */
        unsigned char *target;   /* name of target frame where to open the link */
        unsigned char *where_img;   /* URL of image (if any) */
        unsigned char *img_alt;         /* alt of image (if any) - valid only
when link is an image */
        struct form_control *form;   /* form info, usually NULL */
        unsigned sel_color;   /* link color */
        int n;   /* number of points */
        struct point *pos;
        struct js_event_spec *js_event;
        int obj_order;
#ifdef G
        struct rect r;
        struct g_object *obj;
#endif
};
-----------------------------------------------------------------------

Now we can see, that there is a pointer "js_event" to struct "js_event_spec".
Let's take a look at this struct:

-----------------------------------------------------------------------
struct js_event_spec {
#ifdef JS
        unsigned char *move_code;
        unsigned char *over_code;
        unsigned char *out_code;
        unsigned char *down_code;
        unsigned char *up_code;
        unsigned char *click_code;
        unsigned char *dbl_code;
        unsigned char *blur_code;
        unsigned char *focus_code;
        unsigned char *change_code;
        unsigned char *keypress_code;
        unsigned char *keyup_code;
        unsigned char *keydown_code;
#else
        char dummy;
#endif
};
-----------------------------------------------------------------------

And, what we can see is, that there is no member "keydown_code" if you didn't
enabled JS -> JavaScript. Just the member "dummy".
That's why the variable "l" in "view.c" is unable to see the member "keydown_code".

So, all you have to do is to enable "javascript", leaving the old version
untouched or waiting for a new version without this bug.

I preferred to enable "javascript".
Comment 7 Marcelo Goes (RETIRED) gentoo-dev 2005-08-29 08:06:33 UTC
Fixed by Seemant in cvs. Thanks for reporting.

@John Berry
If your problem persists, please open a new bug.