El jueves, 17 de septiembre de 2015, 17:48:52 (UTC-5), Mike Nolta escribió:
>
> The problem with
>
> `gcc -L. -shared -o libcrlibm.dylib $(find . -d 1 -name *.o)`
>
> is that the stuff inside $(...) is interpreted as julia code.
>
> I'm not sure what's the best way to do this -- maybe something like:
>
> pipeline(`find . -d 1 -name *.o`, `xargs gcc -L. -shared -o
> libcrlibm.dylib`)
>
Thanks, I think that works. It turned out that the necessary incantation
was even worse,
needing *.o from a subdirectory, so I instead created a simple makefile
with the relevant
command and called that instead.
The dependency now seems to be built properly on Mac OSX.
On Linux (via JuliaBox), as far as I can work out all the steps in the
build are completed, including compiling the shared library,
but it fails with the following error (below).
Does somebody have an idea what is happening here? The relevant commands are
Pkg.clone("http://github.com/dpsanders/CRlibm.jl")
INFO: Cloning CRlibm from http://github.com/dpsanders/CRlibm.jl
INFO: Computing changes...
INFO: No packages to install, update or remove
julia> Pkg.build("CRlibm")
Thanks,
David
============================================================[ ERROR: CRlibm
]============================================================
LoadError: Provider
BinDeps.BuildProcess failed to satisfy dependency libcrlibm
while loading /home/juser/.julia/v0.4/CRlibm/deps/build.jl, in expression
starting on line 51
=========================================================================================================================================
============================================================[ BUILD ERRORS
]=============================================================
WARNING: CRlibm had
build errors.
- packages with build
errors remain installed in /home/juser/.julia/v0.4
- build the package(s) and all dependencies with `Pkg.build("CRlibm")`
- build a single package by running its `deps/build.jl` script
>
> ?
>
> -Mike
>
> On Thu, Sep 17, 2015 at 5:06 PM, David P. Sanders <[email protected]
> <javascript:>> wrote:
> > Hi,
> >
> > I am almost ready to release a simple wrapper of the CRlibm library: see
> > https://github.com/dpsanders/CRlibm.jl
> >
> > The last (?) step I need is to get the gcc command in the below build
> script
> > in deps/build.jl to work.
> > Could somone please suggest how to do this? The problem is that *.o is
> not
> > expanded in Julia commands
> > (maybe this could be added?)
> >
> > I found a previous discussion at
> > https://groups.google.com/forum/#!topic/julia-users/hzBeluKU7P0
> >
> > I tried the solutions suggested, but the ones involving Julia code don't
> > seem
> > to work inside the @build_steps macro, and the one using find,
> implemented
> > as
> >
> > `gcc -L. -shared -o libcrlibm.dylib $(find . -d 1 -name *.o)`
> >
> > gives
> > ERROR: ParseError("missing separator in tuple")
> >
> > Thanks,
> > David
> >
> > Extract from script:
> >
> > provides(SimpleBuild,
> > (@build_steps begin
> > GetSources(libcrlibm)
> >
> > @build_steps begin
> > ChangeDirectory(srcdir)
> > @build_steps begin
> > `./configure CFLAGS=-fpic`
> > `make`
> >
> > `gcc -L. -shared -o libcrlibm.dylib *.o`
> > end
> > end
> > end),
> > libcrlibm, os = :Unix
> > )
> >
> > (How is one supposed to include code here??)
>