Opened 10 years ago

Closed 10 years ago

#41174 closed defect (duplicate)

nip2 update to 7.38.3 - fixes build on mavericks ( 7.26.3_1 fails under Mavericks)

Reported by: Schamschula (Marius Schamschula) Owned by: jcupitt (John Cupitt)
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: mavericks Cc: kurthindenburg (Kurt Hindenburg), ryandesign (Ryan Carsten Schmidt)
Port: nip2

Description

I get the following error in building nip2 7.26.3_1 under Mavericks:

/usr/bin/clang -DHAVE_CONFIG_H -I. -I.. -I/opt/local/include  -I/opt/local/include/graphviz    -I/opt/local/include  -D_REENTRANT -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -D_THREAD_SAFE -D_REENTRANT -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/pango-1.0 -I/opt/local/include/gio-unix-2.0/ -I/opt/local/include -I/opt/local/include/cairo -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng15 -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include -I/opt/local/include/ImageMagick-6 -I/opt/local/include/orc-0.4 -I/opt/local/include -I/opt/local/include/OpenEXR -I/opt/local/include -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng15 -I/opt/local/include  -DG_DISABLE_CAST_CHECKS    -I/opt/local/include  -pipe -Os -arch x86_64 -MT nip2-iimageview.o -MD -MP -MF .deps/nip2-iimageview.Tpo -c -o nip2-iimageview.o `test -f 'iimageview.c' || echo './'`iimageview.c
graphwindow.c:263:38: error: too few arguments to function call, expected 2, have 1
        graphwindow->graph = agread( of->fp );
                            ~~~~~~         ^
/opt/local/include/graphviz/cgraph.h:268:1: note: 'agread' declared here
extern Agraph_t *agread(void *chan, Agdisc_t * disc);
^
1 error generated.
make[3]: *** [nip2-graphwindow.o] Error 1

Full main.log attached

Attachments (4)

main.log (226.4 KB) - added by Schamschula (Marius Schamschula) 10 years ago.
Portfile-nip2.diff (980 bytes) - added by Schamschula (Marius Schamschula) 10 years ago.
nips2.diff (980 bytes) - added by kurthindenburg (Kurt Hindenburg) 10 years ago.
patch for latest nips2
tool.c.diff (624 bytes) - added by kurthindenburg (Kurt Hindenburg) 10 years ago.
Attempt to replace memccpy

Download all attachments as: .zip

Change History (15)

Changed 10 years ago by Schamschula (Marius Schamschula)

Attachment: main.log added

comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: mavericks added
Owner: changed from macports-tickets@… to jcupitt@…
Port: nip2 added

comment:2 in reply to:  description Changed 10 years ago by Schamschula (Marius Schamschula)

I updated the Portfile to the current version of nip2: 7.36.4. This builds fine, even under Mavericks.

comment:3 Changed 10 years ago by Schamschula (Marius Schamschula)

I have updated nip2 to @7.38.1. Also fixed depends_lib from goffice to goffice08, as goffice now requires gtk+3.

Last edited 10 years ago by Schamschula (Marius Schamschula) (previous) (diff)

Changed 10 years ago by Schamschula (Marius Schamschula)

Attachment: Portfile-nip2.diff added

comment:4 Changed 10 years ago by kurthindenburg (Kurt Hindenburg)

Cc: khindenburg@… added

Cc Me!

comment:5 Changed 10 years ago by kurthindenburg (Kurt Hindenburg)

Summary: nip2 7.26.3_1 fails under Mavericksnip2 update to 7.38.3 - fixes build on mavericks ( 7.26.3_1 fails under Mavericks)

Thanks I updated to 7.38.3 and it builds on mavericks - why change goffice to goffice08?

comment:6 Changed 10 years ago by jcupitt (John Cupitt)

goffice is gtk+3 and nip2 is still a gtk+2 program. goffice08 is the last goffice that builds with gtk+2.

nip2 will be moving to gtk+3, but not for another year or so.

Changed 10 years ago by kurthindenburg (Kurt Hindenburg)

Attachment: nips2.diff added

patch for latest nips2

comment:7 Changed 10 years ago by kurthindenburg (Kurt Hindenburg)

It builds/installs but it won't run

Program received signal SIGABRT, Aborted.
0x00007fff97f2b866 in __pthread_kill ()
Last edited 10 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:8 Changed 10 years ago by kurthindenburg (Kurt Hindenburg)

It works if you run from source folder ./src/nip2 but not from a 'make install'

comment:9 Changed 10 years ago by kurthindenburg (Kurt Hindenburg)

The issue appears to be this memccpy in src/tools:

/* Strip underscores (they mark mnemonics). Can't use$
 * strrcpy(), we have overlapping blocks.$
*/$

im_strncpy( value, toolitem->label, MAX_NAME );$
for( i = 0; value[i]; i++ )$
if( value[i] == '_' )$
memccpy( value + i, value + i + 1,$
0, MAX_NAME - i );

Changed 10 years ago by kurthindenburg (Kurt Hindenburg)

Attachment: tool.c.diff added

Attempt to replace memccpy

comment:10 Changed 10 years ago by jcupitt (John Cupitt)

Thanks for finding this khindenburg. I've made a 7.38.4 which incorporates a version of your patch:

https://github.com/jcupitt/nip2/commit/74454e179b6bf961eaa697ae691cd66b4347adb0

I was stupidly using memccpy() on overlapping memory areas, which is undefined.

#44090 has a portfile update which switches to this version. I think this closes both these tickets.

comment:11 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Resolution: duplicate
Status: newclosed

Superseded by #44090.

Note: See TracTickets for help on using tickets.