Bug 1223446 - mono-shogun - Don't build with mono 4
Summary: mono-shogun - Don't build with mono 4
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: shogun
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Björn 'besser82' Esser
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-20 14:11 UTC by Claudio Rodrigo Pereyra DIaz
Modified: 2016-02-10 16:52 UTC (History)
4 users (show)

Fixed In Version: shogun-4.0.1-0.9.git20160125.0382808.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-10 16:52:21 UTC
Type: Bug


Attachments (Terms of Use)
some log of the errors. including the commands to build it (15.59 KB, text/plain)
2015-06-23 09:52 UTC, Timotheus Pokorra
no flags Details
the file that has the broken code (2.38 MB, text/x-csrc)
2015-06-23 09:56 UTC, Timotheus Pokorra
no flags Details
patch to ignore methods and classes for src/interfaces/csharp_modular/modshogunPINVOKE.cs to compile (2.65 KB, patch)
2015-08-06 20:32 UTC, Timotheus Pokorra
no flags Details | Diff

Description Claudio Rodrigo Pereyra DIaz 2015-05-20 14:11:34 UTC
Require fix spec and maybe patches to build with mono 4x
Need move to profile 4.5

See: https://fedoraproject.org/wiki/Changes/Mono_4

Comment 1 Timotheus Pokorra 2015-05-21 06:49:14 UTC
currently, the build on Koji for Rawhide fails much earlier, before Mono is involved: http://koji.fedoraproject.org/koji/packageinfo?packageID=17486

I did a build on F21 with mono4 installed, which took much longer. I got trouble with generated code in /root/rpmbuild/BUILD/shogun-4.0.0/build-x86-64.fc21/src/interfaces/csharp_modular/modshogunPINVOKE.cs

/usr/bin/mcs /t:library *.cs /out:modshogun.dll
modshogunPINVOKE.cs(7271,137): error CS0100: The parameter name `size' is a duplicate
modshogunPINVOKE.cs(17102,255+): error CS0100: The parameter name `size' is a duplicate
modshogunPINVOKE.cs(17888,190): error CS0100: The parameter name `size' is a duplicate
modshogunPINVOKE.cs(17891,190): error CS0100: The parameter name `size' is a duplicate
modshogunPINVOKE.cs(19190,192): error CS0100: The parameter name `size' is a duplicate

and many more errors like this.

The code for example in line 7271 looks like this:
public static extern global::System.IntPtr new_IndexBlockTree__SWIG_3(int size, [MarshalAs(UnmanagedType.LPArray)]double[] jarg1, int size, [MarshalAs(UnmanagedType.LPArray)]double[] jarg2);

hope this helps...

Comment 2 Timotheus Pokorra 2015-06-17 06:07:12 UTC
Thanks Björn, Rawhide does now get to the "The parameter name `size' is a duplicate" error!

https://github.com/shogun-toolbox/shogun/issues/2425 looks like a similar bug, but did not receive any attention upstream: 
modshogunPINVOKE.cs(9270,141): error CS0100: The parameter name `rows' is a duplicate

Can you please follow the "duplicate parameter size" problem up with upstream?

Thanks!

Comment 3 Timotheus Pokorra 2015-06-23 09:50:58 UTC
Updated https://github.com/shogun-toolbox/shogun/issues/2425

One solution would be to ignore those methods, but then we would lose them.

This is a problem of SWIG creating invalid code.

Comment 4 Timotheus Pokorra 2015-06-23 09:52:43 UTC
Created attachment 1042196 [details]
some log of the errors. including the commands to build it

this log might help to reproduce the error without having to wait for the full rebuild...

Comment 5 Timotheus Pokorra 2015-06-23 09:56:00 UTC
Created attachment 1042198 [details]
the file that has the broken code

this might help to see which methods are affected

Comment 6 Timotheus Pokorra 2015-06-24 16:38:53 UTC
I have reported this issue at the swig project: https://github.com/swig/swig/issues/448

Comment 7 Timotheus Pokorra 2015-06-25 07:06:48 UTC
Got a reply from the swig project.
It seems that the use of the inattributes by shogun is not correct.

Please see my comment: https://github.com/shogun-toolbox/shogun/issues/2425#issuecomment-115132055

Probably best would be to work on a test case similar to the test cases provided by Swig.

But I guess this becomes more of a task for a developer rather than a packager, so I think I need to pull out now...
I still have not figured out (did not look for it) what the purpose of shogun is, so I leave this to people more interested in it :)

Comment 8 Jan Kurik 2015-07-15 14:07:47 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 9 Timotheus Pokorra 2015-08-06 20:32:50 UTC
Created attachment 1060073 [details]
patch to ignore methods and classes for src/interfaces/csharp_modular/modshogunPINVOKE.cs to compile

I have uploaded the patch that will ignore some of the methods that create invalid C# code.
Now src/interfaces/csharp_modular/modshogunPINVOKE.cs can be compiled.

Comment 10 Timotheus Pokorra 2015-08-07 07:06:38 UTC
unfortunately, the c# examples don't build anymore after ignoring these methods and classes when I built with rpmbuild -ba SPECS/shogun.spec --without java --without lua --without octave --without r --without ruby --without python --without python3 --without cli --without memtest --without testsuite

Also when I build on Koji, I get errors in the java examples, even though I have an ifdef for CSharp only for ignoring those methods and classes:
https://koji.fedoraproject.org/koji/taskinfo?taskID=10626687
[ 88%] Generating kernel_histogram_word_string_modular.class
cd /builddir/build/BUILD/shogun-4.0.0/build-x86-64.fc24/examples/undocumented/java_modular && /usr/bin/javac -cp /usr/lib/java/jblas.jar:/builddir/build/BUILD/shogun-4.0.0/build-x86-64.fc24/src/interfaces/java_modular/shogun.jar:/builddir/build/BUILD/shogun-4.0.0/build-x86-64.fc24/examples/undocumented/java_modular -d /builddir/build/BUILD/shogun-4.0.0/build-x86-64.fc24/examples/undocumented/java_modular /builddir/build/BUILD/shogun-4.0.0/examples/undocumented/java_modular/kernel_histogram_word_string_modular.java
/builddir/build/BUILD/shogun-4.0.0/examples/undocumented/java_modular/preprocessor_sortulongstring_modular.java:37: error: cannot find symbol
		CommUlongStringKernel kernel = new CommUlongStringKernel(feats_train, feats_train, false);
		^
  symbol:   class CommUlongStringKernel
  location: class preprocessor_sortulongstring_modular
/builddir/build/BUILD/shogun-4.0.0/examples/undocumented/java_modular/preprocessor_sortulongstring_modular.java:37: error: cannot find symbol
		CommUlongStringKernel kernel = new CommUlongStringKernel(feats_train, feats_train, false);
		                                   ^
  symbol:   class CommUlongStringKernel
  location: class preprocessor_sortulongstring_modular
2 errors
examples/undocumented/java_modular/CMakeFiles/build_java_examples.dir/build.make:453: recipe for target 'examples/undocumented/java_modular/preprocessor_sortulongstring_modular.class' failed
make[2]: *** [examples/undocumented/java_modular/preprocessor_sortulongstring_modular.class] Error 1
make[2]: *** Waiting for unfinished jobs....
/builddir/build/BUILD/shogun-4.0.0/examples/undocumented/java_modular/kernel_comm_ulong_string_modular.java:36: error: cannot find symbol
		CommUlongStringKernel kernel = new CommUlongStringKernel(feats_train, feats_train, use_sign);
		^
  symbol:   class CommUlongStringKernel
  location: class kernel_comm_ulong_string_modular
/builddir/build/BUILD/shogun-4.0.0/examples/undocumented/java_modular/kernel_comm_ulong_string_modular.java:36: error: cannot find symbol
		CommUlongStringKernel kernel = new CommUlongStringKernel(feats_train, feats_train, use_sign);
		                                   ^
  symbol:   class CommUlongStringKernel
  location: class kernel_comm_ulong_string_modular
2 errors

Comment 11 Timotheus Pokorra 2015-08-07 07:12:04 UTC
I think the support for C# needs to be resolved upstream, in the shogun project, as it was discussed on IRC fedora-de.

I tried to build shogun without mono (replacing "with mono" with "with monoOff" in the spec file), but now I get errors already here:
https://kojipkgs.fedoraproject.org//work/tasks/2514/10632514/build.log
[ 52%] Building CXX object src/shogun/CMakeFiles/libshogun.dir/base/class_list.cpp.o
cd /builddir/build/BUILD/shogun-4.0.0/build-x86-32.fc24/src/shogun && /usr/bin/c++   -DDSFMT_MEXP=19937 -DHAVE_ARPACK -DHAVE_ARPREC -DHAVE_ATLAS -DHAVE_COLPACK -DHAVE_CURL -DHAVE_CXX11 -DHAVE_CXX11_ATOMIC -DHAVE_DECL_ISINF -DHAVE_DECL_ISNAN -DHAVE_DECL_SIGNGAM -DHAVE_DOXYGEN -DHAVE_EIGEN3 -DHAVE_FPCLASS -DHAVE_HDF5 -DHAVE_ISINF -DHAVE_ISNAN -DHAVE_JBLAS -DHAVE_JSON -DHAVE_LAPACK -DHAVE_LARGEFILE -DHAVE_LGAMMAL -DHAVE_LINALG_LIB -DHAVE_LOG2 -DHAVE_NLOPT -DHAVE_OCTAVE -DHAVE_POWL -DHAVE_PROTOBUF -DHAVE_PTHREAD -DHAVE_PYTHON -DHAVE_SQRTL -DHAVE_STD_ISFINITE -DHAVE_STD_ISINF -DHAVE_STD_ISNAN -DHAVE_STD_UNORDERED_MAP -DHAVE_XML -DINVERSE_ACTIVE=INVERSE_LUSOL -DOCTAVE_APIVERSION=50 -DPARSER_LP -DRoleIsExternalInvEngine -DSFMT_MEXP=19937 -DSHOGUN -DSWIG_TYPE_TABLE=shogun -DUSE_BIGSTATES -DUSE_BOOL -DUSE_BZIP2 -DUSE_CHAR -DUSE_COMPLEX128 -DUSE_FLOAT32 -DUSE_FLOAT64 -DUSE_GLPK -DUSE_GZIP -DUSE_HMMCACHE -DUSE_INT32 -DUSE_INT64 -DUSE_LPSOLVE -DUSE_LZMA -DUSE_LZO -DUSE_REFERENCE_COUNTING -DUSE_SHORTREAL_KERNELCACHE -DUSE_SNAPPY -DUSE_SPINLOCKS -DUSE_UINT16 -DUSE_UINT64 -DUSE_UINT8 -DYY_NEVER_INTERACTIVE -std=c++11 -Wall -Wno-unused-parameter -Wformat -Wformat-security -Wparentheses -Wshadow -Wno-unknown-pragmas -Wno-deprecated  -fopenmp -O2 -O2 -g -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables  -fPIC -I/builddir/build/BUILD/shogun-4.0.0/src -I/builddir/build/BUILD/shogun-4.0.0/src/shogun -I/builddir/build/BUILD/shogun-4.0.0/build-x86-32.fc24/src -I/builddir/build/BUILD/shogun-4.0.0/build-x86-32.fc24/src/shogun -isystem /usr/include/eigen3 -I/usr/lib/../include -I/usr/include/json-c -I/usr/include/libxml2    -o CMakeFiles/libshogun.dir/base/class_list.cpp.o -c /builddir/build/BUILD/shogun-4.0.0/src/shogun/base/class_list.cpp
In file included from /builddir/build/BUILD/shogun-4.0.0/src/shogun/kernel/normalizer/KernelNormalizer.h:16:0,
                 from /builddir/build/BUILD/shogun-4.0.0/src/shogun/transfer/multitask/MultitaskKernelMaskNormalizer.h:16,
                 from /builddir/build/BUILD/shogun-4.0.0/src/shogun/base/class_list.cpp:16:
/builddir/build/BUILD/shogun-4.0.0/src/shogun/kernel/Kernel.h: In member function 'float64_t shogun::CKernel::kernel(int32_t, int32_t)':
/builddir/build/BUILD/shogun-4.0.0/src/shogun/kernel/Kernel.h:207:21: error: invalid use of incomplete type 'class shogun::CKernelNormalizer'
    return normalizer->normalize(compute(idx_a, idx_b), idx_a, idx_b);
                     ^
In file included from /builddir/build/BUILD/shogun-4.0.0/src/shogun/kernel/normalizer/KernelNormalizer.h:16:0,
                 from /builddir/build/BUILD/shogun-4.0.0/src/shogun/transfer/multitask/MultitaskKernelMaskNormalizer.h:16,
                 from /builddir/build/BUILD/shogun-4.0.0/src/shogun/base/class_list.cpp:16:
/builddir/build/BUILD/shogun-4.0.0/src/shogun/kernel/Kernel.h:32:8: note: forward declaration of 'class shogun::CKernelNormalizer'
  class CKernelNormalizer;
        ^
src/shogun/CMakeFiles/libshogun.dir/build.make:16432: recipe for target 'src/shogun/CMakeFiles/libshogun.dir/base/class_list.cpp.o' failed

I give up again, I hope someone can make sense of it...

Comment 12 Claudio Rodrigo Pereyra DIaz 2015-09-14 13:21:05 UTC
4.0.0-6 - temporarily disabling Mono-bindings on Fedora 23+

No longer block Mono 4 Change

Comment 13 Fedora Update System 2016-01-26 16:10:38 UTC
arprec-2.2.18-1.fc23 shogun-4.0.1-0.9.git20160125.0382808.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-600a58722b

Comment 14 Fedora Update System 2016-01-28 22:27:15 UTC
arprec-2.2.18-1.fc23, shogun-4.0.1-0.9.git20160125.0382808.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-600a58722b

Comment 15 Fedora Update System 2016-02-10 16:52:18 UTC
arprec-2.2.18-1.fc23, shogun-4.0.1-0.9.git20160125.0382808.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.