Giter Site home page Giter Site logo

Comments (11)

rofirrim avatar rofirrim commented on June 24, 2024

Hi, this is a known issue.

Make sure you have bison, flex and gperf installed in your environment. Then run configure again and then make clean and make.

This should fix this issue.

from mcxx.

bhattacharyasarani avatar bhattacharyasarani commented on June 24, 2024

Hi, thanks for your reply. It was very helpful, but did not solve the problem completely. Hoping you can help me this time as well.

Bison and flex were already installed, I added the installation of gperf.
Now the make progressed a few steps, but stopped with another error.

Pasting the console output for make:

CCBUILD lib/perish.o
CCBUILD lib/tpp.o
CCBUILD lib/tpp
PYTHON src/frontend/cxx-asttype-nodecl.def
TPP src/frontend/cxx-asttype.def
tpp - a tiny preprocessor for mcxx 2.3.0
GEN src/frontend/cxx-asttype.h
GEN src/frontend/cxx-asttype.c
TPP src/frontend/c99.l
tpp - a tiny preprocessor for mcxx 2.3.0
chmod: src/frontend/c99.l: new permissions are r-xrwxrwx, not r-xr-xr-x
make: *** [Makefile:12662: src/frontend/c99.l] Error 1

from mcxx.

rofirrim avatar rofirrim commented on June 24, 2024

Hi,

src/frontend/c99.l tpp - a tiny preprocessor for mcxx 2.3.0 chmod: src/frontend/c99.l: new permissions are r-xrwxrwx, not r-xr-xr-x make: *** [Makefile:12662: src/frontend/c99.l] Error 1

Not sure what is this problem. Looks like an issue with the umask or maybe the filesystem you are using inside WSL2 does not allow this combination.

from mcxx.

bhattacharyasarani avatar bhattacharyasarani commented on June 24, 2024

Hi, Thanks you were right. It was indeed a problem of wsl2.
I could manage to install both mercurium and nanos6 in a separate environment.

I could see the compilers generated in mcxx/bin folder.
Thanks :)

But this time I have a followup querry as to how to use this.
Because following the example shown in the nanos github page,
I am trying to simply run a hello world code with the following
$mcxx/bin/mcc -c --ompss-2 hello.c
But it shows the following error
"gcc: fatal error: cannot specify ‘-o’ with ‘-c’, ‘-S’ or ‘-E’ with multiple files"

Am I still missing something? Please let me know what you think.

from mcxx.

rofirrim avatar rofirrim commented on June 24, 2024

Can you run with --v to see how gcc is being invoked by mcc?

from mcxx.

bhattacharyasarani avatar bhattacharyasarani commented on June 24, 2024

Pasting the full message below:

Loading compiler phases for profile 'mcc'
Compiler phases for profile 'mcc' loaded in 0.04 seconds
Compiling file 'omp_exm.c'
gcc -E -D_OMPSS_2=1 -I -include nanos6.h -std=gnu99 -D_MCC -D_MERCURIUM -o /tmp/mcc_zRRk5X omp_exm.c
gcc: fatal error: cannot specify ‘-o’ with ‘-c’, ‘-S’ or ‘-E’ with multiple files
compilation terminated.
Preprocessing failed. Returned code 1
Preprocess failed for file 'omp_exm.c'
Removing temporary filename '/tmp/mcc_zRRk5X'

from mcxx.

rofirrim avatar rofirrim commented on June 24, 2024

gcc -E -D_OMPSS_2=1 -I -include nanos6.h -std=gnu99 -D_MCC -D_MERCURIUM -o /tmp/mcc_zRRk5X omp_exm.c

This alone -I flag suggests your configuration of Mercurium is not right and doesn't have the right path to nanos6. This is confusing gcc

from mcxx.

bhattacharyasarani avatar bhattacharyasarani commented on June 24, 2024

Hi, thanks so much for the prompt reply.

Okay I understand the problem, because while configuring I did not mention the location to nanos install directory to break the chicken-egg problem mentioned.

But now how do I explicitly link these two? I mean how to make nanos6.h available to mcc compiler?

from mcxx.

bhattacharyasarani avatar bhattacharyasarani commented on June 24, 2024

Hi, I was trying more on this. With the following command,
gcc -E -D_OMPSS_2=1 -I -include nanos6.h -std=gnu99 -D_MCC -D_MERCURIUM -o /tmp/mcc_zRRk5X omp_exm.c
if I remove explicitly -E and provide the path to the nanos6.h directory then this works fine and the new executable is stored in /tmp/mcc_OHggqQ
Now my question is, is there a way to change the generation of these flags, in that case which file should I edit?

from mcxx.

rofirrim avatar rofirrim commented on June 24, 2024

But now how do I explicitly link these two? I mean how to make nanos6.h available to mcc compiler?

At configure time you have to pass --with-nanos6 as explained here

https://pm.bsc.es/ftp/ompss-2/doc/user-guide/build/index.html#installation-of-mercurium-compiler

Hope this helps.

from mcxx.

bhattacharyasarani avatar bhattacharyasarani commented on June 24, 2024

It works perfectly now.
Thank you so much for being so patient and helpful.

from mcxx.

Related Issues (17)

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.