Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shogun: import from homebrew/science #23479

Closed
wants to merge 1 commit into from

Conversation

vigsterkr
Copy link
Contributor

and upgrade to 6.1.3

with fix for vecLib

@ilovezfs ilovezfs changed the title add shogun from homebrew-science shogun: import from homebrew/science Jan 30, 2018
@ilovezfs ilovezfs added the science Formula was originally in Homebrew/homebrew-science label Jan 30, 2018
@ilovezfs
Copy link
Contributor

@vigsterkr it would have been preferable to reopen the first PR and force push rather than opening and closing three separate PRs. Please do not close this one if you intend to reopen another one.

@vigsterkr
Copy link
Contributor Author

@ilovezfs tried to reopen the pr but it didn't allow after closing & force pushing... anyhow i ran out of ideas how to fix this issue... so i guess with time this will get autoclosed by the stale bot

@vigsterkr
Copy link
Contributor Author

for the record the first was closed by stale bot that i could not reopen again hence the second pr

@ilovezfs
Copy link
Contributor

@vigsterkr ah OK. Yeah I could have reopened the one stale bot closed for you if you asked. As for force pushing not letting you reopen something, all you have to do is force push the last commit shown in the PR in the GUI, and then it will let you reopen. Then you can force push whatever you want over that.

@vigsterkr
Copy link
Contributor Author

vigsterkr commented Jan 30, 2018

@ilovezfs ok so as you can see now all 3 versions of osx successfully builds and runs the tests, only due to the following errors the jobs fail:

17:38:18   * New formulae should not require patches to build. Patches should be submitted and accepted upstream first.
17:38:18   * python modules have explicit framework links
17:38:18     These python extension modules were linked directly to a Python
17:38:18     framework binary. They should be linked with -undefined dynamic_lookup
17:38:18     instead of -lpython or -framework Python.
17:38:18       /usr/local/opt/shogun/lib/python2.7/site-packages/_shogun.so

i dont know how to silence 1 & 2, i can add to the patch the fix for the 3rd error

@ilovezfs
Copy link
Contributor

You can't silence them but they will go away once it's merged because test-bot will start using --strict instead of --new-formula

@vigsterkr
Copy link
Contributor Author

@ilovezfs ok do you want me to change anything in this patch your its good for merge?

@ilovezfs
Copy link
Contributor

These python extension modules were linked ...

that needs to be fixed

@vigsterkr
Copy link
Contributor Author

@ilovezfs ok i'll add the fix for it to the patch

"-DBUILD_META_EXAMPLES=OFF",
"-DINTERFACE_PYTHON=ON",
"-DINTERFACE_JAVA=ON",
"-DJBLAS=#{libexec}/jblas-1.2.3.jar",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not hard-code this version number. You could do

      "-DJBLAS=#{libexec}/jblas-#{resource("jblas").version}.jar",

end

test do
(testpath/"test.cpp").write <<-EOS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to use squiggly heredocs <<~EOS

int main(int argc, char** argv)
{
init_shogun_with_defaults();
assert (std::strcmp(MAINVERSION, "6.1.3") == 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not hard code this version.

assert (std::strcmp(MAINVERSION, "#{version}") == 0);

sha256 "dfbd03cba5e1a134a520d6c06aceaa3c5143cad638fc208150d980a44e5252cf" => :x86_64_linux
end

patch :DATA
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use patch do block(s).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i've taken this from other formulas, as i want to have the patch part of the formula file

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are legacy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so i'm force to put the patches somewhere separately on the web?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there upstream commits that apply cleanly? Those can be used like

    patch do
      url "https://github.com/bitcoin/bitcoin/commit/1ec0c0a01c.patch?full_index=1"
      sha256 "a1f761fe29f78e783cb4b55f8029900f94b45d1188cb81c80f73347ee2fdc025"
    end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did my share of complaining about it at one point. You're not the first to say that and you won't be the last.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep i thought so, i'm just confirming the observation of others ;)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I like the fact that it keeps really long patches out of the main repository, which would distort contributor statistics whenever someone has a patch that is thousands of lines long.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

k i'm ready with the fixes... once the above mentioned pr gets merged i can push the fix for the comments

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

url "http://shogun-toolbox.org/archives/shogun/releases/6.1/sources/shogun-6.1.3.tar.bz2"
sha256 "57169dc8c05b216771c567b2ee2988f14488dd13f7d191ebc9d0703bead4c9e6"

bottle do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can just remove the entire bottle block

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean the content not the, but keep

  bottle do
  end

or?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete that too

sha256 "36ee86d5adbabc4fa2643a073f93d5504bdfed37a149a3a49f4dde259f35a750"
end

resource "jblas" do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would put this above numpy

depends_on "xz"

resource "numpy" do
url "https://files.pythonhosted.org/packages/bf/2d/005e45738ab07a26e621c9c12dc97381f372e06678adf7dc3356a69b5960/numpy-1.13.3.zip"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

current version is 1.14.0


mkdir "build" do
system "cmake", "..", *args
system "make"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it fail without the separate make step?

"-DLIB_INSTALL_DIR=#{lib}",
]

mkdir "build" do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does an in-tree build fail?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it does

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

EOS

ENV.cxx11
cxx_with_flags = ENV.cxx.split + ["-I#{include}", "test.cpp",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is overly fancy. I'd just do system ENV.cxx, "-std=c++11", ... and remove the ENV.cxx11

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there actually ENV.cxx14?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope and there won't be.

:PYTHONPATH => ENV["PYTHONPATH"],
:LAPACKE_PATH => '#{Formula["lapack"].opt_lib}',
}
bin.env_script_all_files(libexec/"bin", env)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this end up putting in bin?

ENV["PYTHONPATH"] = libexec/"lib/python2.7/site-packages"
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"

res = %w[numpy]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's just the one so the array and loop aren't needed. just resource("numpy").stage do etc.

depends_on "eigen"
depends_on "glpk"
depends_on "hdf5"
depends_on :java
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this needed at run time if the user doesn't use the java feature?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noup

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably should be

depends_on :java => ["1.7+", :build]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or actually it can probably be left out altogether since the jar is prebuilt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which jar? you need java to build the jar

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so i guess you want to do the same for python?

It's already the case since macOS comes with Python.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which jar? you need java to build the jar

I'm thinking of jblas. I guess it builds more jars?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it builds a jar itself, so jvm is required for build

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. What is minimum Java needed? Probably

depends_on :java => ["1.7+", :build]

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, we could go with 1.6 as well but it's EOL so better go with 1.7..... although that one is EOL as well :)

@vigsterkr
Copy link
Contributor Author

here it goes...

url "http://shogun-toolbox.org/archives/shogun/releases/6.1/sources/shogun-6.1.3.tar.bz2"
sha256 "57169dc8c05b216771c567b2ee2988f14488dd13f7d191ebc9d0703bead4c9e6"

patch do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These belong under the dependencies but above the resources.

depends_on "eigen"
depends_on "glpk"
depends_on "hdf5"
depends_on :java => ["1.7+", :build]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is build-time so it should be sorted alphabetically amongst the build time dependencies.


libexec.install resource("jblas")

args = std_cmake_args + [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nothing is being optionally appended to this array so these should all be inlined below. See opencascade for an example.

@ilovezfs
Copy link
Contributor

Warning: shogun dependency gcc was built with a different C++ standard
library (libstdc++ from clang). This may cause problems at runtime.

So I'd add cxxstdlib_check :skip too.

@vigsterkr
Copy link
Contributor Author

@ilovezfs in!

@ilovezfs
Copy link
Contributor

Warning: tried to install empty array to /usr/local/Cellar/shogun/6.1.3/bin

So it looks like the bin I asked about is doing nothing.

@ilovezfs
Copy link
Contributor

Specifically, something is wrong with

    system "python", *Language::Python.setup_install_args(libexec)
    bin.install Dir[libexec/"bin/*"]
    env = {
      :PATH => "#{libexec}/vendor/bin:$PATH",
      :PYTHONPATH => ENV["PYTHONPATH"],
      :LAPACKE_PATH => '#{Formula["lapack"].opt_lib}',
    }
    bin.env_script_all_files(libexec/"bin", env)

if that bin.install is installing nothing.

@vigsterkr
Copy link
Contributor Author

i guess this would be enough...?

    system "python", *Language::Python.setup_install_args(libexec)
    env = {
      :PYTHONPATH => ENV["PYTHONPATH"],
      :LAPACKE_PATH => '#{Formula["lapack"].opt_lib}',
    }
    bin.env_script_all_files(env)

@vigsterkr
Copy link
Contributor Author

or should it be:

    system "python", *Language::Python.setup_install_args(libexec)
    bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"],
                            :LAPACKE_PATH => '#{Formula["lapack"].opt_lib}')

?

@ilovezfs
Copy link
Contributor

==> python -c import setuptools... --no-user-cfg install --prefix=/usr/local/Cellar/shogun/6.1.3/libexec --single-version-externally-managed --record=installed.txt
-- The C compiler identification is AppleClang 8.0.0.8000042
-- The CXX compiler identification is AppleClang 8.0.0.8000042
-- Check for working C compiler: /usr/local/Homebrew/Library/Homebrew/shims/super/clang
-- Check for working C compiler: /usr/local/Homebrew/Library/Homebrew/shims/super/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/local/Homebrew/Library/Homebrew/shims/super/clang++
-- Check for working CXX compiler: /usr/local/Homebrew/Library/Homebrew/shims/super/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find CCache (missing: CCACHE CCACHE_VERSION) 
-- Found SWIG: /usr/local/bin/swig (found suitable version "3.0.12", minimum required is "3.0.5") 
-- Using system's malloc
-- Could NOT find GDB (missing: GDB_COMMAND GDB_VERSION) 
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) (Required is at least version "1.8.6")
-- Found PythonInterp: /usr/bin/python (found version "2.7.10") 
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- dir='/tmp/shogun-20180130-80023-468lpq/shogun-6.1.3/src'
-- dir='/tmp/shogun-20180130-80023-468lpq/shogun-6.1.3/build/src'
-- dir='/tmp/shogun-20180130-80023-468lpq/shogun-6.1.3/src/gpl'
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) 
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) 
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND) 
-- Performing Test HAVE_CXA_DEMANGLE
-- Performing Test HAVE_CXA_DEMANGLE - Success
-- Looking for xmmintrin.h
-- Looking for xmmintrin.h - found
-- Looking for emmintrin.h
-- Looking for emmintrin.h - found
-- Looking for signgam
-- Looking for signgam - found
-- Looking for fdopen
-- Looking for fdopen - found
-- Looking for lgammal
-- Looking for lgammal - found
-- Found Eigen3: /usr/local/include/eigen3 (found suitable version "3.3.4", minimum required is "3.1.2") 
-- Found OPENCL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/OpenCL.framework  
-- Could NOT find ViennaCL (missing: VIENNACL_INCLUDE_DIR VIENNACL_ENCODED_VERSION) (Required is at least version "1.5.0")
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") 
-- Could NOT find TFLogger (missing: TFLogger_DIR)
-- Looking for dgemm_
-- Looking for dgemm_ - found
-- A library with BLAS API found.
-- Found Accelerate.framework using as BLAS/LAPACK backend.
-- Enabling Accelerate.framework as BLAS backend for Eigen.
-- Performing Test VECLIB_INCLUDE_WORKS
-- Performing Test VECLIB_INCLUDE_WORKS - Failed
-- Could not include <vecLib/cblas.h> hence not enabling LAPACK as an Eigen backend
-- Found GLPK: /usr/local/lib/libglpk.dylib  
-- Could NOT find CPLEX (missing: CPLEX_LIBRARY CPLEX_INCLUDE_DIR) 
-- Found Arpack : /usr/local/lib/libarpack.dylib
-- Could NOT find MOSEK (missing: MOSEK_DIR MOSEK_INCLUDE_DIR MOSEK_LIBRARY MOSEK_LIBRARIES) 
-- Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR) 
-- Found JSON: /usr/local/include/json-c (found suitable version "0.12.1", minimum required is "0.11") 
-- Found LibXml2: /usr/lib/libxml2.dylib (found version "2.9.2") 
-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- Found HDF5: /usr/local/lib/libhdf5.dylib;/usr/local/lib/libsz.dylib;/usr/lib/libz.dylib;/usr/lib/libdl.dylib;/usr/lib/libm.dylib (found version "1.10.1")  
-- Found CURL: /usr/lib/libcurl.dylib (found version "7.43.0") 
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.5") 
-- Found BZip2: /usr/lib/libbz2.dylib (found version "1.0.6") 
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Looking for lzma_auto_decoder in /usr/local/lib/liblzma.dylib
-- Looking for lzma_auto_decoder in /usr/local/lib/liblzma.dylib - found
-- Looking for lzma_easy_encoder in /usr/local/lib/liblzma.dylib
-- Looking for lzma_easy_encoder in /usr/local/lib/liblzma.dylib - found
-- Looking for lzma_lzma_preset in /usr/local/lib/liblzma.dylib
-- Looking for lzma_lzma_preset in /usr/local/lib/liblzma.dylib - found
-- Found LibLZMA: /usr/local/include (found version "5.2.3") 
-- Found SNAPPY: /usr/local/lib/libsnappy.dylib  
-- Lzo Library /usr/local/lib/liblzo2.dylib
-- Lzo Include Found in /usr/local/include
-- Found NLOPT: /usr/local/lib/libnlopt.dylib  
-- Could NOT find LPSOLVE (missing: LPSOLVE_LIBRARIES LPSOLVE_INCLUDE_DIR) 
-- Could NOT find ColPack (missing: COLPACK_LIBRARIES COLPACK_LIBRARY_DIR COLPACK_INCLUDE_DIR) 
-- Could NOT find ARPREC (missing: ARPREC_LIBRARIES ARPREC_INCLUDE_DIR) 
-- Looking for arc4random
-- Looking for arc4random - found
-- Linker: Default system linker
-- Checking to see if CXX compiler accepts flag -flto=thin
-- Checking to see if CXX compiler accepts flag -flto=thin - yes
-- The ctags found is not suitable for meta examples.
-- Could NOT find Ctags (missing: CTAGS_EXECUTABLE) 
-- Found PythonLibs: /usr/lib/libpython2.7.dylib (found suitable exact version "2.7.10") 
-- Found NumPy: version "1.14.0" /usr/local/Cellar/shogun/6.1.3/libexec/vendor/lib/python2.7/site-packages/numpy/core/include
Using static linking for Python
classifier_custom_kernel.py
classifier_domainadaptationsvm.py
classifier_featureblock_logistic_regression.py
classifier_gmnpsvm.py
classifier_gpbtsvm.py
classifier_larank.py
classifier_lda.py
classifier_libsvmoneclass.py
classifier_mpdsvm.py
classifier_multiclass_ecoc.py
classifier_multiclassliblinear.py
classifier_multiclassmachine.py
classifier_multiclassocas.py
classifier_multilabeloutputliblinear.py
classifier_perceptron.py
classifier_ssk.py
classifier_svmlight.py
classifier_svmlight_batch_linadd.py
classifier_svmlight_linear_term.py
classifier_svmocas.py
classifier_svmsgd.py
converter_diffusionmaps.py
converter_factoranalysis.py
converter_hasheddoc.py
converter_hessianlocallylinearembedding.py
converter_isomap.py
converter_kernellocallylinearembedding.py
converter_laplacianeigenmaps.py
converter_linearlocaltangentspacealignment.py
converter_localitypreservingprojections.py
converter_locallylinearembedding.py
converter_localtangentspacealignment.py
converter_multidimensionalscaling.py
converter_stochasticproximityembedding.py
converter_tdistributedstochasticneighborembedding.py
distance_canberra.py
distance_canberraword.py
distance_chebyshew.py
distance_chisquare.py
distance_director_euclidean.py
distance_geodesic.py
distance_hammingword.py
distance_jensen.py
distance_manhattenword.py
distance_minkowski.py
distance_normsquared.py
distance_sparseeuclidean.py
distance_tanimoto.py
distribution_histogram.py
distribution_hmm.py
distribution_linearhmm.py
distribution_ppwm.py
evaluation_clustering.py
evaluation_clustering_simple.py
evaluation_contingencytableevaluation.py
evaluation_cross_validation_classification.py
evaluation_cross_validation_mkl_weight_storage.py
evaluation_cross_validation_regression.py
evaluation_director_contingencytableevaluation.py
evaluation_meansquarederror.py
evaluation_meansquaredlogerror.py
evaluation_multiclassaccuracy.py
evaluation_multiclassovrevaluation.py
evaluation_prcevaluation.py
evaluation_rocevaluation.py
evaluation_thresholds.py
features_binned_dot.py
features_dense.py
features_dense_byte.py
features_dense_io.py
features_dense_longint.py
features_dense_protocols.py
features_dense_real.py
features_dense_zero_copy.py
features_director_dot.py
features_hasheddocdot.py
features_io.py
features_read_svmlight_format.py
features_snp.py
features_sparse.py
features_string_char.py
features_string_char_compressed.py
features_string_file.py
features_string_file_char.py
features_string_hashed_wd.py
features_string_sliding_window.py
features_string_ulong.py
features_string_word.py
kernel_anova.py
kernel_auc.py
kernel_cauchy.py
kernel_chi2.py
kernel_circular.py
kernel_combined.py
kernel_combined_custom_poly.py
kernel_comm_ulong_string.py
kernel_comm_word_string.py
kernel_const.py
kernel_custom.py
kernel_diag.py
kernel_director_linear.py
kernel_distance.py
kernel_exponential.py
kernel_fisher.py
kernel_fixed_degree_string.py
kernel_gaussian.py
kernel_gaussian_shift.py
kernel_histogram_word_string.py
kernel_inversemultiquadric.py
kernel_io.py
kernel_linear.py
kernel_linear_byte.py
kernel_linear_string.py
kernel_linear_word.py
kernel_local_alignment_string.py
kernel_locality_improved_string.py
kernel_log.py
kernel_match_word_string.py
kernel_multiquadric.py
kernel_oligo_string.py
kernel_poly.py
kernel_poly_match_string.py
kernel_poly_match_word_string.py
kernel_power.py
kernel_rationalquadratic.py
kernel_salzberg_word_string.py
kernel_sigmoid.py
kernel_simple_locality_improved_string.py
kernel_sparse_gaussian.py
kernel_sparse_linear.py
kernel_sparse_poly.py
kernel_spherical.py
kernel_spline.py
kernel_ssk_string.py
kernel_top.py
kernel_tstudent.py
kernel_wave.py
kernel_wavelet.py
kernel_weighted_comm_word_string.py
kernel_weighted_degree_position_string.py
kernel_weighted_degree_string.py
labels_io.py
library_fisher2x3.py
library_time.py
mathematics_linsolver_cg.py
mathematics_logdet.py
mathematics_sparseinversecovariance.py
metric_lmnn.py
mkl_binclass.py
mkl_multiclass.py
modelselection_grid_search_kernel.py
modelselection_grid_search_krr.py
modelselection_grid_search_liblinear.py
modelselection_grid_search_libsvr.py
modelselection_random_search_liblinear.py
multiclass_c45classifiertree.py
multiclass_id3classifiertree.py
multiclass_randomforest.py
preprocessor_dimensionreductionpreprocessor.py
preprocessor_fisherlda.py
preprocessor_kernelpca.py
preprocessor_logplusone.py
preprocessor_normone.py
preprocessor_pca.py
preprocessor_prunevarsubmean.py
preprocessor_randomfouriergausspreproc.py
preprocessor_sortulongstring.py
preprocessor_sortwordstring.py
regression_cartree.py
regression_chaidtree.py
regression_randomforest.py
regression_svrlight.py
serialization_complex_example.py
serialization_matrix.py
serialization_string_kernels.py
serialization_svmlight.py
so_multiclass.py
stochasticgbmachine.py
streaming_vw.py
streaming_vw_createcache.py
structure_discrete_hmsvm_bmrm.py
structure_discrete_hmsvm_mosek.py
structure_dynprog.py
structure_factor_graph_model.py
structure_graphcuts.py
structure_hierarchical_multilabel_classification.py
structure_multiclass_bmrm.py
structure_plif_hmsvm_bmrm.py
structure_plif_hmsvm_mosek.py
tests_check_commwordkernel_memleak.py
transfer_multitask_clustered_logistic_regression.py
transfer_multitask_l12_logistic_regression.py
transfer_multitask_leastsquares_regression.py
transfer_multitask_logistic_regression.py
transfer_multitask_trace_logistic_regression.py
CMake Warning at cmake/FindPLY.cmake:24 (message):
  ply import failure:

Call Stack (most recent call first):
  examples/meta/CMakeLists.txt:4 (FIND_PACKAGE)


CMake Error at examples/meta/CMakeLists.txt:6 (message):
  Python module ply required for meta examples.  Install or set
  BUILD_META_EXAMPLES=OFF


-- Configuring incomplete, errors occurred!
See also "/tmp/shogun-20180130-80023-468lpq/shogun-6.1.3/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/shogun-20180130-80023-468lpq/shogun-6.1.3/build/CMakeFiles/CMakeError.log".
make: *** No rule to make target `all'.  Stop.
make: *** No rule to make target `install'.  Stop.
Conversion of long_description from markdown to reStructuredText failed, skipping...
Retrieving Shogun version
Verifying Shogun preconditions
Shogun build environment completed tasks: cmake: [False] -  make: [False] - make install: [False]
Bootstrapping Shogun
Running CMake
CMake arguments: -DINTERFACE_PYTHON=ON -DENABLE_TESTING=OFF -DCMAKE_INSTALL_PREFIX=install 
Creating build directory: /private/tmp/shogun-20180130-80023-468lpq/shogun-6.1.3/build
CMake error.
Error running CMake
Running make
make arguments: all 
make error.
Error running make
Running make
make arguments: install 
make error.
Error running make install
Verifying Shogun preconditions
Shogun build environment completed tasks: cmake: [False] -  make: [False] - make install: [False]
Shogun bootstrapping failed!
Please make sure that you have cmake and make installed.
/usr/local/Homebrew/Library/Homebrew/debrew.rb:11:in `raise'
RuntimeError: here
1. raise
2. ignore
3. backtrace
4. irb
5. shell

That part seems to be failing despite not failing the whole build. Are you seeing that happen locally?

@vigsterkr
Copy link
Contributor Author

mmm why is that setuptools called at all?

@ilovezfs
Copy link
Contributor

The bin.env_script_all_files is not wrong unless there's nothing in bin. What is supposed to actually be getting installed by the

system "python", *Language::Python.setup_install_args(libexec)

Or is the only point of that part to get numpy installed before proceeding?

@vigsterkr
Copy link
Contributor Author

it's only to trigger numpy having installed...

@ilovezfs
Copy link
Contributor

OK so I think we just need

ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
resource("numpy").stage do
  system "python", *Language::Python.setup_install_args(libexec/"vendor")
end

and the rest isn't doing anything.

@vigsterkr
Copy link
Contributor Author

ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages" is already before resource("numpy").stage do
how about having LAPACKE_PATH defined in the env?

@vigsterkr
Copy link
Contributor Author

vigsterkr commented Jan 30, 2018

or should i just do ENV["LAPACKE_PATH"] = '#{Formula["lapack"].opt_lib}' ?

@ilovezfs
Copy link
Contributor

ilovezfs commented Jan 30, 2018

It's not currently getting defined in ENV at all. The entire

    bin.install Dir[libexec/"bin/*"]
    env = {
      :PATH => "#{libexec}/vendor/bin:$PATH",
      :PYTHONPATH => ENV["PYTHONPATH"],
      :LAPACKE_PATH => '#{Formula["lapack"].opt_lib}',
    }
    bin.env_script_all_files(libexec/"bin", env)

is currently a no-op.

If you need to set LAPACKE_PATH in the environment (do you?), that would be

ENV["LAPACKE_PATH"] = Formula["lapack"].opt_lib

(or should that be Formula["lapack"].opt_prefix …?)

@vigsterkr
Copy link
Contributor Author

dropped all those things and added ENV["LAPACKE_PATH"] = Formula["lapack"].opt_lib

# https://github.com/shogun-toolbox/shogun/commit/fef8937d215db7
ENV.append_to_cflags "-D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0"

ENV["PYTHONPATH"] = libexec/"lib/python2.7/site-packages"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this line needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well otherwise cmake will not find numpy...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It won't? Shouldn't the ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages" take care of that?

system "python", *Language::Python.setup_install_args(libexec/"vendor")
end

ENV["LAPACKE_PATH"] = Formula["lapack"].opt_lib
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not opt_prefix?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noup i actually need /usr/local/..../lib

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@ilovezfs
Copy link
Contributor

brew linkage shogun

is showing

Dependencies with no linkage:
  eigen
  lapack
  readline

So I assume we should drop the readline dependency? And that the ENV["LAPACKE_PATH"] = Formula["lapack"].opt_lib is intended to fix the lack of lapack linkage?

@vigsterkr
Copy link
Contributor Author

mmm that linkage is not going to be fulfilled for lapack in case of sierra and el captialismo... as in both cases there's a problem with cmake + clang....

@ilovezfs
Copy link
Contributor

Should we scope depends_on "lapack" to High Sierra then?

and upgrade to 6.1.3
@vigsterkr
Copy link
Contributor Author

scoped, dropped, fixed....

@ilovezfs ilovezfs added the ready to merge PR can be merged once CI is green label Jan 30, 2018
@ilovezfs ilovezfs closed this in 50c52c9 Jan 30, 2018
@ilovezfs
Copy link
Contributor

Thanks for your first contribution to Homebrew, @vigsterkr! Without people like you submitting PRs we couldn't run this project. You rock!

@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ready to merge PR can be merged once CI is green science Formula was originally in Homebrew/homebrew-science
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants