Bug 192074 - cad/netgen fails to build after update ports tree on 10-STABLE amd64
Summary: cad/netgen fails to build after update ports tree on 10-STABLE amd64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Stephen Montgomery-Smith
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-23 22:38 UTC by Ivan Klymenko
Modified: 2014-07-25 23:07 UTC (History)
1 user (show)

See Also:


Attachments
Proposed patch to fix the problem (1.57 KB, patch)
2014-07-25 02:06 UTC, Stephen Montgomery-Smith
no flags Details | Diff
Proposed patch part 2 (920 bytes, patch)
2014-07-25 02:10 UTC, Stephen Montgomery-Smith
no flags Details | Diff
Proposed patch part 2, version 2 (1.26 KB, text/plain)
2014-07-25 02:14 UTC, Stephen Montgomery-Smith
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Klymenko 2014-07-23 22:38:05 UTC
[snip]
1 warning generated.
mv -f .deps/demoview.Tpo .deps/demoview.Po
c++ -DHAVE_CONFIG_H -I. -I..  -I../libsrc/include -I../libsrc/interface -DOPENGL  -DTOGL_X11  -I"/usr/local/include/tcl8.6"  -DFFMPEG -D__STDC_CONSTANT_MACROS -DJPEGLIB -I/usr/local/include -I/usr/local/include/tcl8.6 -I/usr/local/include/tk8.6 -I/usr/local/lib/Togl-1.7  -O2 -pipe -march=native -fstack-protector -fno-strict-aliasing -DOCCGEOMETRY -DHAVE_CONFIG_H -Damd64 -I/usr/local/include/OpenCASCADE -MT ngappinit.o -MD -MP -MF .deps/ngappinit.Tpo -c -o ngappinit.o ngappinit.cpp
In file included from ngappinit.cpp:8:
In file included from ../libsrc/include/meshing.hpp:1:
In file included from ../libsrc/include/../meshing/meshing.hpp:6:
In file included from ../libsrc/include/../meshing/../include/myadt.hpp:1:
In file included from ../libsrc/include/../general/myadt.hpp:26:
../libsrc/include/../general/array.hpp:329:12: warning: destination for this 'memcpy' call is a pointer to dynamic class 'netgen::Element'; vtable pointer will be
      overwritten [-Wdynamic-class-memaccess]
          memcpy (p, data, mins * sizeof(T));
          ~~~~~~  ^
../libsrc/include/../general/array.hpp:218:2: note: in instantiation of member function 'netgen::Array<netgen::Element, 0>::ReSize' requested here
        ReSize (nsize);
        ^
../libsrc/include/../meshing/meshclass.hpp:200:19: note: in instantiation of member function 'netgen::Array<netgen::Element, 0>::SetSize' requested here
      volelements.SetSize(0); 
                  ^
../libsrc/include/../general/array.hpp:329:12: note: explicitly cast the pointer to silence this warning
          memcpy (p, data, mins * sizeof(T));
                  ^
                  (void*)
1 warning generated.
mv -f .deps/ngappinit.Tpo .deps/ngappinit.Po
c++ -DHAVE_CONFIG_H -I. -I..  -I../libsrc/include -I../libsrc/interface -DOPENGL  -DTOGL_X11  -I"/usr/local/include/tcl8.6"  -DFFMPEG -D__STDC_CONSTANT_MACROS -DJPEGLIB -I/usr/local/include -I/usr/local/include/tcl8.6 -I/usr/local/include/tk8.6 -I/usr/local/lib/Togl-1.7  -O2 -pipe -march=native -fstack-protector -fno-strict-aliasing -DOCCGEOMETRY -DHAVE_CONFIG_H -Damd64 -I/usr/local/include/OpenCASCADE -MT onetcl.o -MD -MP -MF .deps/onetcl.Tpo -c -o onetcl.o onetcl.cpp
mv -f .deps/onetcl.Tpo .deps/onetcl.Po
c++ -DHAVE_CONFIG_H -I. -I..  -I../libsrc/include -I../libsrc/interface -DOPENGL  -DTOGL_X11  -I"/usr/local/include/tcl8.6"  -DFFMPEG -D__STDC_CONSTANT_MACROS -DJPEGLIB -I/usr/local/include -I/usr/local/include/tcl8.6 -I/usr/local/include/tk8.6 -I/usr/local/lib/Togl-1.7  -O2 -pipe -march=native -fstack-protector -fno-strict-aliasing -DOCCGEOMETRY -DHAVE_CONFIG_H -Damd64 -I/usr/local/include/OpenCASCADE -MT parallelfunc.o -MD -MP -MF .deps/parallelfunc.Tpo -c -o parallelfunc.o parallelfunc.cpp
mv -f .deps/parallelfunc.Tpo .deps/parallelfunc.Po
c++ -DHAVE_CONFIG_H -I. -I..  -I../libsrc/include -I../libsrc/interface -DOPENGL  -DTOGL_X11  -I"/usr/local/include/tcl8.6"  -DFFMPEG -D__STDC_CONSTANT_MACROS -DJPEGLIB -I/usr/local/include -I/usr/local/include/tcl8.6 -I/usr/local/include/tk8.6 -I/usr/local/lib/Togl-1.7  -O2 -pipe -march=native -fstack-protector -fno-strict-aliasing -DOCCGEOMETRY -DHAVE_CONFIG_H -Damd64 -I/usr/local/include/OpenCASCADE -MT ngpkg.o -MD -MP -MF .deps/ngpkg.Tpo -c -o ngpkg.o ngpkg.cpp
In file included from ngpkg.cpp:28:
In file included from ./togl_1_7.h:16:
/usr/local/lib/Togl-1.7/togl_ws.h:5:10: warning: 'TOGL_X11' macro redefined
# define TOGL_X11
         ^
<command line>:3:9: note: previous definition is here
#define TOGL_X11 1
        ^
In file included from ngpkg.cpp:50:
In file included from /usr/local/include/jpeglib.h:27:
/usr/local/include/jmorecfg.h:198:9: warning: 'EXTERN' macro redefined
#define EXTERN(type)            extern "C" type
        ^
/usr/local/include/tcl8.6/tcl.h:306:12: note: previous definition is here
#   define EXTERN extern "C" TCL_STORAGE_CLASS
           ^
ngpkg.cpp:2228:22: error: use of undeclared identifier 'av_get_pict_type_char'; did you mean 'av_get_picture_type_char'?
    char pict_type = av_get_pict_type_char(context->coded_frame->pict_type);
                     ^~~~~~~~~~~~~~~~~~~~~
                     av_get_picture_type_char
/usr/local/include/libavutil/avutil.h:277:6: note: 'av_get_picture_type_char' declared here
char av_get_picture_type_char(enum AVPictureType pict_type);
     ^
ngpkg.cpp:2252:12: error: unknown type name 'CodecID'; did you mean 'AVCodecID'?
    static CodecID codec_id = CODEC_ID_MPEG1VIDEO;
           ^~~~~~~
           AVCodecID
/usr/local/include/libavcodec/avcodec.h:107:6: note: 'AVCodecID' declared here
enum AVCodecID {
     ^
ngpkg.cpp:2312:19: error: use of undeclared identifier 'avcodec_alloc_context'; did you mean 'avformat_alloc_context'?
        context = avcodec_alloc_context();
                  ^~~~~~~~~~~~~~~~~~~~~
                  avformat_alloc_context
/usr/local/include/libavformat/avformat.h:1650:18: note: 'avformat_alloc_context' declared here
AVFormatContext *avformat_alloc_context(void);
                 ^
ngpkg.cpp:2312:17: error: assigning to 'AVCodecContext *' from incompatible type 'AVFormatContext *'
        context = avcodec_alloc_context();
                ^ ~~~~~~~~~~~~~~~~~~~~~~~
ngpkg.cpp:2323:13: error: use of undeclared identifier 'avcodec_open'
        if( avcodec_open( context, codec ) < 0 ) {
            ^
ngpkg.cpp:2332:22: warning: 'avcodec_alloc_frame' is deprecated [-Wdeprecated-declarations]
        YUVpicture = avcodec_alloc_frame();
                     ^
/usr/local/include/libavcodec/avcodec.h:3422:10: note: 'avcodec_alloc_frame' declared here
AVFrame *avcodec_alloc_frame(void);
         ^
ngpkg.cpp:2341:22: warning: 'avcodec_alloc_frame' is deprecated [-Wdeprecated-declarations]
        RGBpicture = avcodec_alloc_frame();
                     ^
/usr/local/include/libavcodec/avcodec.h:3422:10: note: 'avcodec_alloc_frame' declared here
AVFrame *avcodec_alloc_frame(void);
         ^
ngpkg.cpp:2401:17: warning: 'avcodec_encode_video' is deprecated [-Wdeprecated-declarations]
        bytes = avcodec_encode_video( context, buff.MPG,
                ^
/usr/local/include/libavcodec/avcodec.h:4340:5: note: 'avcodec_encode_video' declared here
int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size,
    ^
ngpkg.cpp:2424:19: warning: 'avcodec_encode_video' is deprecated [-Wdeprecated-declarations]
          bytes = avcodec_encode_video( context, buff.MPG, MPGbufsize, NULL );
                  ^
/usr/local/include/libavcodec/avcodec.h:4340:5: note: 'avcodec_encode_video' declared here
int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size,
    ^
In file included from ngpkg.cpp:8:
In file included from ../libsrc/include/myadt.hpp:1:
In file included from ../libsrc/include/../general/myadt.hpp:26:
../libsrc/include/../general/array.hpp:329:12: warning: destination for this 'memcpy' call is a pointer to dynamic class 'netgen::Element'; vtable pointer will be
      overwritten [-Wdynamic-class-memaccess]
          memcpy (p, data, mins * sizeof(T));
          ~~~~~~  ^
../libsrc/include/../general/array.hpp:218:2: note: in instantiation of member function 'netgen::Array<netgen::Element, 0>::ReSize' requested here
        ReSize (nsize);
        ^
../libsrc/include/../meshing/meshclass.hpp:200:19: note: in instantiation of member function 'netgen::Array<netgen::Element, 0>::SetSize' requested here
      volelements.SetSize(0); 
                  ^
../libsrc/include/../general/array.hpp:329:12: note: explicitly cast the pointer to silence this warning
          memcpy (p, data, mins * sizeof(T));
                  ^
                  (void*)
7 warnings and 5 errors generated.
gmake[4]: *** [ngpkg.o] Ошибка 1
gmake[4]: Выход из каталога `/media/da0s1/obj/usr/ports/cad/netgen/work/netgen-5.0.0/ng'
gmake[3]: *** [all-recursive] Ошибка 1
gmake[3]: Выход из каталога `/media/da0s1/obj/usr/ports/cad/netgen/work/netgen-5.0.0'
gmake[2]: *** [all] Ошибка 2
gmake[2]: Выход из каталога `/media/da0s1/obj/usr/ports/cad/netgen/work/netgen-5.0.0'
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/cad/netgen
*** Error code 1

Stop.
make: stopped in /usr/ports/cad/netgen

===>>> make build failed for cad/netgen
===>>> Aborting update

===>>> Update for cad/netgen failed
===>>> Aborting update
Comment 1 John Marino freebsd_committer freebsd_triage 2014-07-24 08:17:30 UTC
over to maintainer.

Note to submitter: If the point of the PR is just to alert the maintainer, he'll get notices every time it fails to build on the FreeBSD cluster.  For this purpose, the PR is unnecessary ... he knows already.
Comment 2 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2014-07-24 18:20:52 UTC
It looks like the clang compiler is getting more fussy.  Did you update the operating system since the last successful build?

Also, I haven't yet received any reports of a build failure from the FreeBSD cluster, suggesting again it might be an OS issue.
Comment 3 Ivan Klymenko 2014-07-24 18:49:45 UTC
(In reply to Stephen Montgomery-Smith from comment #2)
> It looks like the clang compiler is getting more fussy.  Did you update the
> operating system since the last successful build?
> 
> Also, I haven't yet received any reports of a build failure from the FreeBSD
> cluster, suggesting again it might be an OS issue.

I have FreeBSD 10.0-STABLE #0 r269056
Comment 4 Ivan Klymenko 2014-07-24 20:03:39 UTC
(In reply to Stephen Montgomery-Smith from comment #2)
> It looks like the clang compiler is getting more fussy.  Did you update the
> operating system since the last successful build?
> 
> Also, I haven't yet received any reports of a build failure from the FreeBSD
> cluster, suggesting again it might be an OS issue.

Cluster assembly for ports build ports with the default options - problems arise when installing with more options...
Comment 5 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2014-07-24 21:01:14 UTC
(In reply to Ivan Klymenko from comment #4)
> (In reply to Stephen Montgomery-Smith from comment #2)
> > It looks like the clang compiler is getting more fussy.  Did you update the
> > operating system since the last successful build?
> > 
> > Also, I haven't yet received any reports of a build failure from the FreeBSD
> > cluster, suggesting again it might be an OS issue.
> 
> Cluster assembly for ports build ports with the default options - problems
> arise when installing with more options...

Did you select any special options?
Comment 6 Ivan Klymenko 2014-07-24 21:11:06 UTC
(In reply to Stephen Montgomery-Smith from comment #5)
> (In reply to Ivan Klymenko from comment #4)
> > (In reply to Stephen Montgomery-Smith from comment #2)
> > > It looks like the clang compiler is getting more fussy.  Did you update the
> > > operating system since the last successful build?
> > > 
> > > Also, I haven't yet received any reports of a build failure from the FreeBSD
> > > cluster, suggesting again it might be an OS issue.
> > 
> > Cluster assembly for ports build ports with the default options - problems
> > arise when installing with more options...
> 
> Did you select any special options?

Certainly, it can be seen from the above output in the error message - I chose the option OPTIONS_FILE_SET+=FFMPEG
Comment 7 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2014-07-25 02:06:08 UTC
Created attachment 144956 [details]
Proposed patch to fix the problem

Can you see if this patch fixes it?

If it does, this is not related to the OS.  The information that you used the option FFMPEG was very useful, and you should have said so clearly in the original report.  It is very unlikely I would have spotted this from the code segment you sent me, and also it is very unlikely that I could have found this proposed fix.
Comment 8 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2014-07-25 02:10:37 UTC
Created attachment 144957 [details]
Proposed patch part 2

You need to use this patch as well.  (For some reason bugzilla didn't include this in the previous patch.)
Comment 9 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2014-07-25 02:14:24 UTC
Created attachment 144958 [details]
Proposed patch part 2, version 2

Copy this file into /usr/ports/cad/netgen/files/ along with applying the prior patch to Makefile
Comment 10 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2014-07-25 02:15:12 UTC
(In reply to Stephen Montgomery-Smith from comment #8)
> Created attachment 144957 [details]
> Proposed patch part 2
> 
> You need to use this patch as well.  (For some reason bugzilla didn't
> include this in the previous patch.)

bugzilla doesn't seem to like patches created against empty files!
Comment 11 Kurt Jaeger freebsd_committer freebsd_triage 2014-07-25 03:58:40 UTC
tested attachement 144956, it was fine here.

Building right now.

Stephen, will you commit this yourself ?
Comment 12 Kurt Jaeger freebsd_committer freebsd_triage 2014-07-25 04:12:52 UTC
Ah, there's a PR for the bugzilla diff issue:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=190724

So it affects the diff view in bugzilla, but not the attachment itself.
Comment 13 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2014-07-25 04:18:51 UTC
(In reply to Kurt Jaeger from comment #11)
> tested attachement 144956, it was fine here.
> 
> Building right now.
> 
> Stephen, will you commit this yourself ?

I will commit it myself.

Now I can see that downloading the patch directly works great.

Don't forget to have the option FFMPEG set (it is unset by default).  Otherwise the bug doesn't manifest itself.
Comment 14 Kurt Jaeger freebsd_committer freebsd_triage 2014-07-25 04:40:01 UTC
cad/netgen build fine with the patch (and option ffmpeg).
Comment 15 commit-hook freebsd_committer freebsd_triage 2014-07-25 04:51:37 UTC
A commit references this bug:

Author: stephen
Date: Fri Jul 25 04:51:30 UTC 2014
New revision: 362869
URL: http://svnweb.freebsd.org/changeset/ports/362869

Log:
  - Link with multimedia/ffmpeg0 instead of multimedia/ffmpeg (only applies when
    the option FFMPEG is set).
  - Bump portrevision.

  PR:		192074
  Submitted by:	Ivan Klymenko <fidaj@ukr.net>

Changes:
  head/cad/netgen/Makefile
  head/cad/netgen/files/patch-configure
Comment 16 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2014-07-25 04:54:06 UTC
(In reply to Kurt Jaeger from comment #14)
> cad/netgen build fine with the patch (and option ffmpeg).

Thank you.  I have now committed the patch.
Comment 17 Ivan Klymenko 2014-07-25 22:00:11 UTC
when the installed cad/netgen - update using portmaster failed.
solved the problem of the complete removal of the port and build from scratch

thanks.
Comment 18 Ivan Klymenko 2014-07-25 22:01:25 UTC
(In reply to Ivan Klymenko from comment #17)
> when the installed cad/netgen - update using portmaster failed.
> solved the problem of the complete removal of the port and build from scratch
> 
> thanks.


I think it is worth pointing out in ports/UPDATING
Comment 19 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2014-07-25 22:19:20 UTC
(In reply to Ivan Klymenko from comment #18)
> (In reply to Ivan Klymenko from comment #17)
> > when the installed cad/netgen - update using portmaster failed.
> > solved the problem of the complete removal of the port and build from scratch
> > 
> > thanks.
> 
> 
> I think it is worth pointing out in ports/UPDATING

Can you provide more details as to how it failed with portmaster?
Comment 20 Ivan Klymenko 2014-07-25 22:29:30 UTC
(In reply to Stephen Montgomery-Smith from comment #19)
> (In reply to Ivan Klymenko from comment #18)
> > (In reply to Ivan Klymenko from comment #17)
> > > when the installed cad/netgen - update using portmaster failed.
> > > solved the problem of the complete removal of the port and build from scratch
> > > 
> > > thanks.
> > 
> > 
> > I think it is worth pointing out in ports/UPDATING
> 
> Can you provide more details as to how it failed with portmaster?

unfortunately I did not save the output of the error, but the problem was with libocc: invalid YYY for symbol `XXX' definition
Comment 21 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2014-07-25 22:46:21 UTC
(In reply to Ivan Klymenko from comment #20)
> (In reply to Stephen Montgomery-Smith from comment #19)
> > (In reply to Ivan Klymenko from comment #18)
> > > (In reply to Ivan Klymenko from comment #17)
> > > > when the installed cad/netgen - update using portmaster failed.
> > > > solved the problem of the complete removal of the port and build from scratch
> > > > 
> > > > thanks.
> > > 
> > > 
> > > I think it is worth pointing out in ports/UPDATING
> > 
> > Can you provide more details as to how it failed with portmaster?
> 
> unfortunately I did not save the output of the error, but the problem was
> with libocc: invalid YYY for symbol `XXX' definition

OK, I think I can see how that might have happened.  But let me ask people in ports@ to get a sense of how appropriate a message on UPDATING might be.
Comment 22 commit-hook freebsd_committer freebsd_triage 2014-07-25 23:02:34 UTC
A commit references this bug:

Author: stephen
Date: Fri Jul 25 23:02:07 UTC 2014
New revision: 362940
URL: http://svnweb.freebsd.org/changeset/ports/362940

Log:
  - Add message about removing cad/netgen before reinstalling.

  PR:		192074
  Submitted by:	Ivan Klymenko <fidaj@ukr.net>

Changes:
  head/UPDATING
Comment 23 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2014-07-25 23:03:31 UTC
(In reply to Stephen Montgomery-Smith from comment #21)
> (In reply to Ivan Klymenko from comment #20)
> > (In reply to Stephen Montgomery-Smith from comment #19)
> > > (In reply to Ivan Klymenko from comment #18)
> > > > (In reply to Ivan Klymenko from comment #17)
> > > > > when the installed cad/netgen - update using portmaster failed.
> > > > > solved the problem of the complete removal of the port and build from scratch
> > > > > 
> > > > > thanks.
> > > > 
> > > > 
> > > > I think it is worth pointing out in ports/UPDATING
> > > 
> > > Can you provide more details as to how it failed with portmaster?
> > 
> > unfortunately I did not save the output of the error, but the problem was
> > with libocc: invalid YYY for symbol `XXX' definition
> 
> OK, I think I can see how that might have happened.  But let me ask people
> in ports@ to get a sense of how appropriate a message on UPDATING might be.

I changed my mind about asking.  A message in UPDATING is appropriate, and I just committed it.
Comment 24 Ivan Klymenko 2014-07-25 23:07:57 UTC
(In reply to Stephen Montgomery-Smith from comment #23)
> (In reply to Stephen Montgomery-Smith from comment #21)
> > (In reply to Ivan Klymenko from comment #20)
> > > (In reply to Stephen Montgomery-Smith from comment #19)
> > > > (In reply to Ivan Klymenko from comment #18)
> > > > > (In reply to Ivan Klymenko from comment #17)
> > > > > > when the installed cad/netgen - update using portmaster failed.
> > > > > > solved the problem of the complete removal of the port and build from scratch
> > > > > > 
> > > > > > thanks.
> > > > > 
> > > > > 
> > > > > I think it is worth pointing out in ports/UPDATING
> > > > 
> > > > Can you provide more details as to how it failed with portmaster?
> > > 
> > > unfortunately I did not save the output of the error, but the problem was
> > > with libocc: invalid YYY for symbol `XXX' definition
> > 
> > OK, I think I can see how that might have happened.  But let me ask people
> > in ports@ to get a sense of how appropriate a message on UPDATING might be.
> 
> I changed my mind about asking.  A message in UPDATING is appropriate, and I
> just committed it.

Thank you very much :)

Now really the problem can be considered solved :)