r-universe-org / help

Support and bug tracker for R-universe
https://docs.r-universe.dev/
8 stars 2 forks source link

igraph build failure #222

Closed ntamas closed 1 year ago

ntamas commented 1 year ago

It looks like igraph fails to build in the Windows environment of R-universe, see the corresponding Github Actions logs here. Is there a way to get access to D:/a/igraph/igraph/igraph.Rcheck/00install.out to figure out what's wrong?

jeroen commented 1 year ago

It is available form the log file that you linked, under "package install log"

Screenshot 2022-12-13 at 10 58 03 PM

But I see the actual problem happens earlier, where it fails to download rtools42, and hence falls back on rtools4, which does not have #include <glpk.h>...

ntamas commented 1 year ago

Thanks for the info! Is there something we can do to make the build succeed or is it a temporary error with RTools 4.2 that will resolve itself sooner or later?

jeroen commented 1 year ago

I triggered a rebuild, but we get a different error now: https://github.com/r-universe/igraph/actions/runs/3685509786/jobs/6245947262

2022-12-13T22:08:36.6192015Z /usr/bin/sh: -c: line 1: unexpected EOF while looking for matching `"'
2022-12-13T22:08:36.6192475Z make: *** [C:/R/share/make/winshlib.mk:16: igraph.dll] Error 2

Which probably indicates an escape problem of quotes in a Makevars.win file?

krlmlr commented 1 year ago

Makevars.win looks like shown below. The only special thing here is the very long OBJECTS variable. Could that cause a problem?

The package builds without error from source on GHA: https://github.com/igraph/rigraph/actions/runs/3693780343/jobs/6254312688.

CXX_STD = CXX11

LIB_XML ?= $(MINGW_PREFIX)
GLPK_HOME ?= $(MINGW_PREFIX)
LIB_GMP ?= $(MINGW_PREFIX)

PKG_CPPFLAGS= -I${LIB_XML}/include/libxml2 -I${LIB_XML}/include -DLIBXML_STATIC -DUSING_R -DHAVE_FMEMOPEN=0 -DHAVE_OPEN_MEMSTREAM=0 -DHAVE_RINTF -DHAVE_STRCASECMP -DWin32 -DHAVE_LIBXML=1 -DHAVE_UNISTD_H -Wall -DPACKAGE_VERSION=\"1.3.5.9055\" -DHAVE_FMIN=1 -DHAVE_LOG2=1 -DHAVE_GFORTRAN -DINTERNAL_ARPACK -I${GLPK_HOME}/include -DHAVE_GLPK=1 -DIGRAPH_THREAD_LOCAL= -DPRPACK_IGRAPH_SUPPORT -I. -Icore -Iinclude -Ivendor -DNDEBUG -DNTIMER -DNPRINT -I${LIB_GMP}/include

PKG_LIBS = -L${LIB_XML}/lib -lxml2 -liconv -lz -lws2_32 -lstdc++ -L${GLPK_HOME}/lib -lglpk -lgmp -lgfortran -L$(LIB_GMP)/lib $(BLAS_LIBS) $(LAPACK_LIBS)
OBJECTS=core/centrality/betweenness.o \
core/centrality/centrality_other.o \
core/centrality/centralization.o \
core/centrality/closeness.o \
core/centrality/coreness.o \
core/centrality/prpack.o \
core/centrality/prpack/prpack_base_graph.o \
core/centrality/prpack/prpack_igraph_graph.o \
core/centrality/prpack/prpack_preprocessed_ge_graph.o \
core/centrality/prpack/prpack_preprocessed_gs_graph.o \
core/centrality/prpack/prpack_preprocessed_scc_graph.o \
core/centrality/prpack/prpack_preprocessed_schur_graph.o \
core/centrality/prpack/prpack_result.o \
core/centrality/prpack/prpack_solver.o \
core/centrality/prpack/prpack_utils.o \
core/cliques/cliquer/cliquer.o \
core/cliques/cliquer/cliquer_graph.o \
core/cliques/cliquer/reorder.o \
core/cliques/cliquer_wrapper.o \
core/cliques/cliques.o \
core/cliques/glet.o \
core/cliques/maximal_cliques.o \
core/community/community_misc.o \
core/community/edge_betweenness.o \
core/community/fast_modularity.o \
core/community/fluid.o \
core/community/infomap/infomap.o \
core/community/infomap/infomap_FlowGraph.o \
core/community/infomap/infomap_Greedy.o \
core/community/infomap/infomap_Node.o \
core/community/label_propagation.o \
core/community/leading_eigenvector.o \
core/community/leiden.o \
core/community/louvain.o \
core/community/modularity.o \
core/community/optimal_modularity.o \
core/community/spinglass/NetDataTypes.o \
core/community/spinglass/NetRoutines.o \
core/community/spinglass/clustertool.o \
core/community/spinglass/pottsmodel_2.o \
core/community/walktrap/walktrap.o \
core/community/walktrap/walktrap_communities.o \
core/community/walktrap/walktrap_graph.o \
core/community/walktrap/walktrap_heap.o \
core/connectivity/cohesive_blocks.o \
core/connectivity/components.o \
core/connectivity/separators.o \
core/constructors/adjacency.o \
core/constructors/atlas.o \
core/constructors/basic_constructors.o \
core/constructors/de_bruijn.o \
core/constructors/famous.o \
core/constructors/full.o \
core/constructors/kautz.o \
core/constructors/lcf.o \
core/constructors/linegraph.o \
core/constructors/prufer.o \
core/constructors/regular.o \
core/core/array.o \
core/core/buckets.o \
core/core/cutheap.o \
core/core/dqueue.o \
core/core/error.o \
core/core/estack.o \
core/core/fixed_vectorlist.o \
core/core/grid.o \
core/core/heap.o \
core/core/indheap.o \
core/core/interruption.o \
core/core/marked_queue.o \
core/core/matrix.o \
core/core/memory.o \
core/core/printing.o \
core/core/progress.o \
core/core/psumtree.o \
core/core/set.o \
core/core/sparsemat.o \
core/core/spmatrix.o \
core/core/stack.o \
core/core/statusbar.o \
core/core/strvector.o \
core/core/trie.o \
core/core/vector.o \
core/core/vector_ptr.o \
core/flow/flow.o \
core/flow/st-cuts.o \
core/games/barabasi.o \
core/games/callaway_traits.o \
core/games/citations.o \
core/games/correlated.o \
core/games/degree_sequence.o \
core/games/degree_sequence_vl/gengraph_box_list.o \
core/games/degree_sequence_vl/gengraph_degree_sequence.o \
core/games/degree_sequence_vl/gengraph_graph_molloy_hash.o \
core/games/degree_sequence_vl/gengraph_graph_molloy_optimized.o \
core/games/degree_sequence_vl/gengraph_mr-connected.o \
core/games/degree_sequence_vl/gengraph_powerlaw.o \
core/games/degree_sequence_vl/gengraph_random.o \
core/games/dotproduct.o \
core/games/erdos_renyi.o \
core/games/establishment.o \
core/games/forestfire.o \
core/games/grg.o \
core/games/growing_random.o \
core/games/islands.o \
core/games/k_regular.o \
core/games/preference.o \
core/games/recent_degree.o \
core/games/sbm.o \
core/games/static_fitness.o \
core/games/tree.o \
core/games/watts_strogatz.o \
core/graph/adjlist.o \
core/graph/attributes.o \
core/graph/basic_query.o \
core/graph/cattributes.o \
core/graph/iterators.o \
core/graph/type_indexededgelist.o \
core/graph/visitors.o \
core/hrg/hrg.o \
core/hrg/hrg_types.o \
core/internal/glpk_support.o \
core/internal/hacks.o \
core/internal/lsap.o \
core/internal/qsort.o \
core/internal/qsort_r.o \
core/internal/zeroin.o \
core/io/dimacs.o \
core/io/dl-lexer.o \
core/io/dl-parser.o \
core/io/dl.o \
core/io/dot.o \
core/io/edgelist.o \
core/io/gml-lexer.o \
core/io/gml-parser.o \
core/io/gml-tree.o \
core/io/gml.o \
core/io/graphdb.o \
core/io/graphml.o \
core/io/leda.o \
core/io/lgl-lexer.o \
core/io/lgl-parser.o \
core/io/lgl.o \
core/io/ncol-lexer.o \
core/io/ncol-parser.o \
core/io/ncol.o \
core/io/pajek-lexer.o \
core/io/pajek-parser.o \
core/io/pajek.o \
core/isomorphism/bliss.o \
core/isomorphism/bliss/defs.o \
core/isomorphism/bliss/graph.o \
core/isomorphism/bliss/heap.o \
core/isomorphism/bliss/orbit.o \
core/isomorphism/bliss/partition.o \
core/isomorphism/bliss/uintseqhash.o \
core/isomorphism/bliss/utils.o \
core/isomorphism/isoclasses.o \
core/isomorphism/isomorphism_misc.o \
core/isomorphism/lad.o \
core/isomorphism/queries.o \
core/isomorphism/vf2.o \
core/layout/circular.o \
core/layout/davidson_harel.o \
core/layout/drl/DensityGrid.o \
core/layout/drl/DensityGrid_3d.o \
core/layout/drl/drl_graph.o \
core/layout/drl/drl_graph_3d.o \
core/layout/drl/drl_layout.o \
core/layout/drl/drl_layout_3d.o \
core/layout/drl/drl_parse.o \
core/layout/fruchterman_reingold.o \
core/layout/gem.o \
core/layout/graphopt.o \
core/layout/kamada_kawai.o \
core/layout/large_graph.o \
core/layout/layout_bipartite.o \
core/layout/layout_grid.o \
core/layout/layout_random.o \
core/layout/mds.o \
core/layout/merge_dla.o \
core/layout/merge_grid.o \
core/layout/reingold_tilford.o \
core/layout/sugiyama.o \
core/linalg/arpack.o \
core/linalg/blas.o \
core/linalg/eigen.o \
core/linalg/lapack.o \
core/math/bfgs.o \
core/math/complex.o \
core/math/utils.o \
core/misc/bipartite.o \
core/misc/chordality.o \
core/misc/cocitation.o \
core/misc/coloring.o \
core/misc/conversion.o \
core/misc/degree_sequence.o \
core/misc/embedding.o \
core/misc/feedback_arc_set.o \
core/misc/graphicality.o \
core/misc/matching.o \
core/misc/microscopic_update.o \
core/misc/mixing.o \
core/misc/motifs.o \
core/misc/other.o \
core/misc/scan.o \
core/misc/sir.o \
core/misc/spanning_trees.o \
core/operators/add_edge.o \
core/operators/complementer.o \
core/operators/compose.o \
core/operators/connect_neighborhood.o \
core/operators/contract.o \
core/operators/difference.o \
core/operators/disjoint_union.o \
core/operators/intersection.o \
core/operators/misc_internal.o \
core/operators/permute.o \
core/operators/reverse.o \
core/operators/rewire.o \
core/operators/rewire_edges.o \
core/operators/simplify.o \
core/operators/subgraph.o \
core/operators/union.o \
core/paths/all_shortest_paths.o \
core/paths/bellman_ford.o \
core/paths/dijkstra.o \
core/paths/distances.o \
core/paths/eulerian.o \
core/paths/histogram.o \
core/paths/johnson.o \
core/paths/random_walk.o \
core/paths/shortest_paths.o \
core/paths/simple_paths.o \
core/paths/unweighted.o \
core/properties/basic_properties.o \
core/properties/constraint.o \
core/properties/convergence_degree.o \
core/properties/dag.o \
core/properties/degrees.o \
core/properties/girth.o \
core/properties/loops.o \
core/properties/multiplicity.o \
core/properties/neighborhood.o \
core/properties/spectral.o \
core/properties/trees.o \
core/properties/triangles.o \
core/random/random.o \
core/scg/scg.o \
core/scg/scg_approximate_methods.o \
core/scg/scg_exact_scg.o \
core/scg/scg_kmeans.o \
core/scg/scg_optimal_method.o \
core/scg/scg_utils.o \
core/version.o \
vendor/cs/cs_add.o \
vendor/cs/cs_amd.o \
vendor/cs/cs_chol.o \
vendor/cs/cs_cholsol.o \
vendor/cs/cs_compress.o \
vendor/cs/cs_counts.o \
vendor/cs/cs_cumsum.o \
vendor/cs/cs_dfs.o \
vendor/cs/cs_dmperm.o \
vendor/cs/cs_droptol.o \
vendor/cs/cs_dropzeros.o \
vendor/cs/cs_dupl.o \
vendor/cs/cs_entry.o \
vendor/cs/cs_ereach.o \
vendor/cs/cs_etree.o \
vendor/cs/cs_fkeep.o \
vendor/cs/cs_gaxpy.o \
vendor/cs/cs_happly.o \
vendor/cs/cs_house.o \
vendor/cs/cs_ipvec.o \
vendor/cs/cs_leaf.o \
vendor/cs/cs_load.o \
vendor/cs/cs_lsolve.o \
vendor/cs/cs_ltsolve.o \
vendor/cs/cs_lu.o \
vendor/cs/cs_lusol.o \
vendor/cs/cs_malloc.o \
vendor/cs/cs_maxtrans.o \
vendor/cs/cs_multiply.o \
vendor/cs/cs_norm.o \
vendor/cs/cs_permute.o \
vendor/cs/cs_pinv.o \
vendor/cs/cs_post.o \
vendor/cs/cs_print.o \
vendor/cs/cs_pvec.o \
vendor/cs/cs_qr.o \
vendor/cs/cs_qrsol.o \
vendor/cs/cs_randperm.o \
vendor/cs/cs_reach.o \
vendor/cs/cs_scatter.o \
vendor/cs/cs_scc.o \
vendor/cs/cs_schol.o \
vendor/cs/cs_spsolve.o \
vendor/cs/cs_sqr.o \
vendor/cs/cs_symperm.o \
vendor/cs/cs_tdfs.o \
vendor/cs/cs_transpose.o \
vendor/cs/cs_updown.o \
vendor/cs/cs_usolve.o \
vendor/cs/cs_util.o \
vendor/cs/cs_utsolve.o \
vendor/mini-gmp/mini-gmp.o \
vendor/plfit/gss.o \
vendor/plfit/hzeta.o \
vendor/plfit/kolmogorov.o \
vendor/plfit/lbfgs.o \
vendor/plfit/mt.o \
vendor/plfit/options.o \
vendor/plfit/platform.o \
vendor/plfit/plfit.o \
vendor/plfit/plfit_error.o \
vendor/plfit/rbinom.o \
vendor/plfit/sampling.o \
vendor/arpack/dgetv0.o \
vendor/arpack/dlaqrb.o \
vendor/arpack/dmout.o \
vendor/arpack/dnaitr.o \
vendor/arpack/dnapps.o \
vendor/arpack/dnaup2.o \
vendor/arpack/dnaupd.o \
vendor/arpack/dnconv.o \
vendor/arpack/dneigh.o \
vendor/arpack/dneupd.o \
vendor/arpack/dngets.o \
vendor/arpack/dsaitr.o \
vendor/arpack/dsapps.o \
vendor/arpack/dsaup2.o \
vendor/arpack/dsaupd.o \
vendor/arpack/dsconv.o \
vendor/arpack/dseigt.o \
vendor/arpack/dsesrt.o \
vendor/arpack/dseupd.o \
vendor/arpack/dsgets.o \
vendor/arpack/dsortc.o \
vendor/arpack/dsortr.o \
vendor/arpack/dstatn.o \
vendor/arpack/dstats.o \
vendor/arpack/dstqrb.o \
vendor/arpack/dvout.o \
vendor/arpack/ivout.o \
vendor/arpack/second.o \
vendor/arpack/wrap.o \
vendor/simpleraytracer/Color.o \
vendor/simpleraytracer/Light.o \
vendor/simpleraytracer/Point.o \
vendor/simpleraytracer/RIgraphRay.o \
vendor/simpleraytracer/Ray.o \
vendor/simpleraytracer/RayTracer.o \
vendor/simpleraytracer/RayVector.o \
vendor/simpleraytracer/Shape.o \
vendor/simpleraytracer/Sphere.o \
vendor/simpleraytracer/Triangle.o \
vendor/simpleraytracer/unit_limiter.o \
vendor/uuid/R.o \
vendor/uuid/clear.o \
vendor/uuid/compare.o \
vendor/uuid/copy.o \
vendor/uuid/gen_uuid.o \
vendor/uuid/isnull.o \
vendor/uuid/pack.o \
vendor/uuid/parse.o \
vendor/uuid/unpack.o \
vendor/uuid/unparse.o \
rinterface.o \
rinterface_extra.o \
rrandom.o \
lazyeval.o
jeroen commented 1 year ago

I think -DPACKAGE_VERSION=\"1.3.5.9055\" may be the problem. You shouldnt need to escape/quote in Makefiles, and I think msys2 may confuse things that start with \ as a path.

ntamas commented 1 year ago

I think we do need to escape there because we want PACKAGE_VERSION to be substituted with "1.3.5.9055" (note the quotes) in the C source file. If I simply write PACKAGE_VERSION="1.3.5.9055", the shell swallows the quotes in our CI so that's why we've escaped it.

I'm trying to think of workarounds, but still I don't understand how it can work in CI on Github Actions on our end but not in R-universe.

jeroen commented 1 year ago

I'm also not sure, r-universe just does R CMD build and then R CMD check.

Can't you just write PACKAGE_VERSION=1.3.5.9055 and then wrap the quotes around it in C?

jeroen commented 1 year ago

I'm not 100% sure that is the problem btw, but that is my suspicion given the error message...

ntamas commented 1 year ago

Can't you just write PACKAGE_VERSION=1.3.5.9055 and then wrap the quotes around it in C?

That's what I'm trying now in https://github.com/igraph/rigraph/commit/fd1b7cb8de80683906c6a61563d24908883e7f5b; waiting for the CI to pass.

ntamas commented 1 year ago

Still no luck; this is the latest build from R-universe and it still fails, even though PACKAGE_VERSION is not quoted any more.

ntamas commented 1 year ago

I came back to this issue and I noticed that only the R-oldrel build is failing now for Windows, the rest are fine. I don't know what changed (if anything).

krlmlr commented 1 year ago

There is no GLPK for i386: https://github.com/r-universe/igraph/actions/runs/4288842512/jobs/7471382979#step:9:87 .

ntamas commented 1 year ago

Ah OK. @jeroen is the build environment to blame for the missing GLPK lib, or is it simply not available for that version of R and Windows?

jeroen commented 1 year ago

I don't know, but we will drop R-4.1 and i386 in a couple of weeks, so don't worry about it.