Skip to content

Commit b6abaf4

Browse files
committed
Fix the build configuration
The build doesn't work due to unresolved calls from libblastrampoline_jll
1 parent 3215f27 commit b6abaf4

File tree

3 files changed

+12
-19
lines changed

3 files changed

+12
-19
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
/Manifest.toml
55
/docs/Manifest.toml
66
/docs/build/
7+
language_wrappers/*.so
8+
language_wrappers/*.dll
9+
language_wrappers/*.dylib

language_wrappers/Makefile

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
# This Makefile template requires the following variables to be set
22
# in the environment or on the command-line:
33
# JULIA: path to julia[.exe] executable
4-
# BIN: binary build directory
54

65
ifndef JULIA
7-
$(error "Please pass JULIA=[path of target julia binary], or set as environment variable!")
8-
endif
9-
ifndef BIN
10-
$(error "Please pass BIN=[path of build directory], or set as environment variable!")
6+
$(error "Please pass JULIA=[path of Julia binary], or set as environment variable!")
117
endif
128

139
#=============================================================================
1410
# location of test source
1511
SRCDIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
1612
PKGDIR := $(dir $(SRCDIR))
17-
JULIAHOME := $(abspath $(JULIA)/../..)
18-
BUILDSCRIPT := $(BIN)/../share/julia/juliac-buildscript.jl
13+
JULIAHOME := $(abspath $(subst bin,,$(dir $(JULIA))))
14+
BUILDSCRIPT := $(JULIAHOME)/share/julia/juliac.jl
1915
# include $(JULIAHOME)/Make.inc
2016

2117
# FIXME
@@ -34,14 +30,14 @@ LDFLAGS_ADD = -lm $(shell $(JULIA_CONFIG) --ldflags --ldlibs) -ljulia-internal
3430

3531
release: NMFMerge-jl.$(SHLIB_EXT)
3632

37-
NMFMerge-jl.$(SHLIB_EXT): $(PKGDIR)/src/NMFMerge.jl $(BUILDSCRIPT)
38-
$(JULIA) -t 1 -J $(BIN)/../lib/julia/sys.$(SHLIB_EXT) --project --startup-file=no --history-file=no --output-incremental=no --strip-ir --strip-metadata --experimental --trim $(BUILDSCRIPT) $(SRCDIR)/lib.jl --output-lib NMFMerge-jl.so
33+
NMFMerge-jl.$(SHLIB_EXT): $(PKGDIR)/src/NMFMerge.jl $(SRCDIR)/lib.jl $(BUILDSCRIPT)
34+
$(JULIA) -t 1 -J $(dir $(JULIA))/../lib/julia/sys.$(SHLIB_EXT) --project --startup-file=no --history-file=no --output-incremental=no --strip-ir --strip-metadata $(BUILDSCRIPT) --experimental --trim $(SRCDIR)/lib.jl --output-lib $(SRCDIR)/NMFMerge-jl.$(SHLIB_EXT)
3935

4036
check: hello$(EXE) basic_jll$(EXE) # FIXME
4137
$(JULIA) --depwarn=error $(SRCDIR)/../runtests.jl $(SRCDIR)/trimming
4238

43-
clean: # FIXME
44-
-rm -f hello$(EXE) basic_jll$(EXE) init.o hello.o basic_jll.o
39+
clean:
40+
-rm -f $(SRCDIR)/NMFMerge-jl.$(SHLIB_EXT)
4541

4642
.PHONY: release clean check
4743

language_wrappers/lib.jl

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,11 @@ module NMFMergeLib
22

33
using NMFMerge
44

5-
struct ReturnValue
6-
niters::Int32
7-
converged::Bool
8-
objvalue::Float64
9-
end
10-
11-
Base.@ccallable function nmfmerge_inplace(Wout::Matrix{Float64}, Hout::Matrix{Float64}, X::Matrix{Float64}, ncomponents::Int32, tol::Float64, maxiter::Int32)::ReturnValue
5+
Base.@ccallable function nmfmerge_inplace(Wout::Matrix{Float64}, Hout::Matrix{Float64}, X::Matrix{Float64}, ncomponents::Int32, tol::Float64, maxiter::Int32)::Bool
126
result = nmfmerge(X, ncomponents; tol_final=tol, maxiter)
137
Wout .= result.W
148
Hout .= result.H
15-
return ReturnValue(result.niters, result.converged, result.objvalue)
9+
return result.converged
1610
end
1711

1812
end

0 commit comments

Comments
 (0)