Giter Club home page Giter Club logo

Comments (22)

johnkerl avatar johnkerl commented on May 18, 2024

I just used make -e CCOMP=clang in the c/ subdirectory, on OSX anyway. (Also, notes to this effect at http://johnkerl.org/miller/doc/build.html.) Can you verify?

from miller.

jungle-boogie avatar jungle-boogie commented on May 18, 2024

Hello,

% make -e CCOMP=clang
make -C dsls put_dsl_parse.o
gcc -o lemon lemon.c
make[1]: exec(gcc) failed (No such file or directory)
*** Error code 1

Stop.
make[1]: stopped in /usr/home/sean/bin/miller/c/dsls
*** Error code 1

Stop.
make: stopped in /usr/home/sean/bin/miller/

Is this too dependent on gcc to work?

from miller.

technion avatar technion commented on May 18, 2024

I edited c/Makefile and just changed CCOMP=gcc to CCOMP=clang.

Compiles with clang and runs all regression tests fine here.

from miller.

jungle-boogie avatar jungle-boogie commented on May 18, 2024

Hi @technion,

What's your OS and clang version?

Thanks!

from miller.

jungle-boogie avatar jungle-boogie commented on May 18, 2024

Hello,

If anyone is familiar with vagrant, here's the freebsd page for 10.2-release:
https://atlas.hashicorp.com/freebsd/boxes/FreeBSD-10.2-RELEASE

from miller.

technion avatar technion commented on May 18, 2024

I am running Arch Linux with clang version 3.6.2.

from miller.

jungle-boogie avatar jungle-boogie commented on May 18, 2024

Unfortunately I have not made any more progress on installing miller.

from miller.

technion avatar technion commented on May 18, 2024

@jungle-boogie have you tried the change I referred to?

The error you pasted suggests your command line simply never passed the variable through (as was the case on my system, hence the edit).

from miller.

technion avatar technion commented on May 18, 2024

@jungle-boogie See the patch I've just submitted. If you can confirm that resolves things for you I'll make a PR.

Note that it allows you to overwrite the compiler from the make command, but you still need to use that command as per the notes.

from miller.

jungle-boogie avatar jungle-boogie commented on May 18, 2024

Hi @technion, @johnkerl,

I got further by first installing and then soft linking gcc from /usr/local/bin/gcc48 to /usr/local/bin/gcc
but still fails:
https://gist.github.com/jungle-boogie/cf75244574102e9661e3

If I run make -e CCOMP=clang:
https://gist.github.com/jungle-boogie/334cf40130db8c410a03

Then I can run ./mlr

Any idea why gcc is still required if I've told it in the Make file to use clang? Is it because of the lemon.c file? I'd rather not have to install a second compiler.

Thanks!

from miller.

technion avatar technion commented on May 18, 2024

I don't believe make -e is doing what we think it's supposed to do on all platforms. This is why I wrote the patch above. Can you please try it?

from miller.

jungle-boogie avatar jungle-boogie commented on May 18, 2024

Hi @technion,

I tired your patch and the results:

make -C dsls put_dsl_parse.o
gcc -o lemon lemon.c
make[1]: exec(gcc) failed (No such file or directory)
*** Error code 1

Stop.
make[1]: stopped in /home/sean/bin/miller/c/dsls
*** Error code 1

Stop.
make: stopped in /home/sean/bin/miller/c

the patch:

vagrant@:~/bin/miller/c % head Makefile 
# ================================================================
CCOMP ?=gcc
CFLAGS=-std=gnu99
IFLAGS=-I.
WFLAGS=-Wall -Werror
LFLAGS=-lm

Does your arch system also happen to have any version of gcc installed?

from miller.

johnkerl avatar johnkerl commented on May 18, 2024

Sorry, my mistake -- yes, the C compiler needs to be propagated to c/dsls as well as c, and so when I built with clang to test the mod, it was building in c/dsls with gcc and in c/ with clang. :/

from miller.

jungle-boogie avatar jungle-boogie commented on May 18, 2024

Hi @johnkerl,

So it stands that gcc is definitely a requirement?

Thanks!

from miller.

johnkerl avatar johnkerl commented on May 18, 2024

No, just that you have to spell clang rather than gcc in two different places.

from miller.

johnkerl avatar johnkerl commented on May 18, 2024

Namely, c/Makefile as well as c/dsls/Makefile.

from miller.

jungle-boogie avatar jungle-boogie commented on May 18, 2024

Hi @johnkerl,

You're getting further!

just some warnings when compiling: https://gist.github.com/jungle-boogie/3eac24667253560f344b

from miller.

technion avatar technion commented on May 18, 2024

Actually, I noted that c/dsls/Makefile has gcc hardcoded in several places, ignoring the use of the CCOMP variable altogether.

I've just pushed a further patch to my branch, can you try it out @jungle-boogie ?

from miller.

jungle-boogie avatar jungle-boogie commented on May 18, 2024

Hi @technion,

That didn't work. Your dsls/Makefile doesn't specify the ccompiler.

See johnkerl's commit here: 0b45ff3

The only problem now are the 9 warnings generated that I reported above.

from miller.

technion avatar technion commented on May 18, 2024

Sounds like a fix then - those warnings aren't related to clang support.

from miller.

johnkerl avatar johnkerl commented on May 18, 2024

Created #24 for those warnings (previously only a to-do at https://github.com/johnkerl/miller/blob/master/c/todo.txt).

Thanks for the report!

from miller.

jungle-boogie avatar jungle-boogie commented on May 18, 2024

Hello @johnkerl, @technion,

Thank you both for stepping through this problem with me!

Best,
sean

from miller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.