Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenFOAM cc_args.py #547

Open
cojua8 opened this issue Dec 21, 2017 · 9 comments
Open

OpenFOAM cc_args.py #547

cojua8 opened this issue Dec 21, 2017 · 9 comments

Comments

@cojua8
Copy link

cojua8 commented Dec 21, 2017

Hello,
I am working with OpenFOAM and I'm trying to make a .clang_complete using 'cc_args.py'.
As OpenFOAM works with wmake, I changed the c++ file:

  1 SUFFIXES += .C
  2 
  3 c++WARN     = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para    meter -Wno-invalid-offsetof
  4 
  5 # Suppress some warnings for flex++ and CGAL
  6 c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
  7 
  8 CC          =  g++ -std=c++11 -m64
  9                                                                                 
 10 include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
 11 
 12 ptFLAGS     = -DNoRepository -ftemplate-depth-100
 13 
 14 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_    DIRS) -fPIC
 15 
 16 Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 17 cxxtoo      = $(Ctoo)
 18 cctoo       = $(Ctoo)
 19 cpptoo      = $(Ctoo)
 20 
 21 LINK_LIBS   = $(c++DBUG)
 22 
 23 LINKLIBSO   = $(CC) $(c++FLAGS) -shared -Xlinker --add-needed -Xlinker --no-as-n    eeded
 24 LINKEXE     = $(CC) $(c++FLAGS) -Xlinker --add-needed -Xlinker --no-as-needed    

I have put '/usr/local/bin/cc_args.py' in CC variable but I get errors.

make: execvp: /usr/local/bin/cc_args.py: Permiso denegado
/home/usuario4/OpenFOAM/OpenFOAM-5.0/wmake/rules/General/transform:25: fallo en las instrucciones para el objetivo 'Make/linux64GccDPInt32Opt/clouds/baseClasses/kinematicCloud/kinematicCloud.o'
make: *** [Make/linux64GccDPInt32Opt/clouds/baseClasses/kinematicCloud/kinematicCloud.o] Error 127

I also did cc_args.py wmake libso but it doesnt do anything

How can i get it running?

@xaizek
Copy link
Collaborator

xaizek commented Dec 21, 2017

Looks like you didn't give execution permissions to the script and need to run chmod +x /usr/local/bin/cc_args.py.

@cojua8
Copy link
Author

cojua8 commented Dec 21, 2017

That did the trick, but now when trying to use clang complete I get a bunch of errors
errores.txt

@xaizek
Copy link
Collaborator

xaizek commented Dec 21, 2017

Looks like it's trying to use clang executable instead of libclang library. I think this shouldn't happen for years now, you might be using a very old version of the plugin.

@cojua8
Copy link
Author

cojua8 commented Dec 21, 2017

How can I solve this issue? I just installed Spacemacs last week

@xaizek
Copy link
Collaborator

xaizek commented Dec 21, 2017

Spacemacs? But clang_complete is a Vim plugin.

@cojua8
Copy link
Author

cojua8 commented Dec 21, 2017

Yeah, but spacemacs uses clang_complete pluing aswell.
Anyway, I think it works in the same way, so how can I solve this?

@xaizek
Copy link
Collaborator

xaizek commented Dec 21, 2017

I don't think they can. Here are all references to "clang_complete": https://github.com/syl20bnr/spacemacs/search?utf8=%E2%9C%93&q=clang_complete&type=

They are reusing .clang_complete file, but completion seems to be performed by ycmd.

Or is there another spacemacs?

@cojua8
Copy link
Author

cojua8 commented Dec 21, 2017

Spacemacs has to ways of autocomplete: ycmd and clang_complete.
I've been trying to get clang working but I keep getting error :(

@xaizek
Copy link
Collaborator

xaizek commented Dec 21, 2017

Do they have it documented somewhere? I just can't get how this could possibly work. Current version of clang_complete doesn't even build such invocation command for clang executable as far as I can see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants