Opened 13 years ago
Closed 12 years ago
#34214 closed enhancement (fixed)
Install clang development headers
Reported by: | cjones051073 (Chris Jones) | Owned by: | jeremyhu (Jeremy Huddleston Sequoia) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.0.4 |
Keywords: | Cc: | cdeil (Christoph Deil), mfeiri, tenomoto (Takeshi Enomoto) | |
Port: | clang-3.1 |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
Hi,
I'm looking into an issue with a variant to the ROOT port, cling, that builds a command line interpreter based on clang. The build is failing, due to missing clang headers. See
for the details. The main error is
/Users/chris/Projects/root/core/meta/src/TCintWithCling.cxx:26:10: fatal error: 'clang/AST/ASTContext.h' file not found #include "clang/AST/ASTContext.h" ^
I've tried build clang myself from source, using the instructions at
http://clang.llvm.org/get_started.html
and doing so I do indeed get the missing headers.
Is there any reason why this are excluded with the MacPorts build ? If not, could I request that these are added in a future version ?
cheers Chris
Attachments (1)
Change History (42)
comment:1 Changed 13 years ago by cdeil (Christoph Deil)
Cc: | Deil.Christoph@… added |
---|
comment:2 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | jeremyhu@… added |
---|---|
Description: | modified (diff) |
Owner: | changed from macports-tickets@… to mfeiri@… |
comment:3 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Cc: | mfeiri@… added; jeremyhu@… removed |
---|---|
Owner: | changed from mfeiri@… to jeremyhu@… |
Status: | new → assigned |
comment:4 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)
They're not included by default because they're not installed by default. What install target are you using to install the headers? Or are you just using them out of your build root?
comment:5 Changed 13 years ago by cjones051073 (Chris Jones)
As far as I can tell there where installed by default. I did nothing specific to ask for them.
I followed the instructions at
http://clang.llvm.org/get_started.html
My only change was I configured my prefix to be something other than the default, for testing. so I ran with
../llvm/configure --prefix=/foo/baa
after
make make install
The headers where installed in /foo/baa/include/clang
cheers Chris
comment:6 Changed 13 years ago by cjones051073 (Chris Jones)
I'm rerunning the configure and build steps, so I can send a log file, if that helps.
However, one possibility is I am building the current svn trunk, whereas the Port builds a particular SVN revision. Maybe installing the headers by default is a new feature ?
Chris
Changed 13 years ago by cjones051073 (Chris Jones)
Attachment: | build.log.bz2 added |
---|
comment:7 Changed 13 years ago by cjones051073 (Chris Jones)
Log attached, for the svn checkout, configure and build steps, showing exactly what was installed by default.
cheers Chris
comment:8 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Thanks, but I only wanted to know what install target you used since the page you listed is about building clang and has nothing to do with install. You used the install target which I don't believe is not the normal way of installing clang. To install clang, you should use the 'install-clang' target. Do you still get the headers if you use 'sudo make install-clang' instead of 'sudo make install' ?
comment:9 Changed 13 years ago by cjones051073 (Chris Jones)
Sorry, I didn't appreciate the difference between 'make install' and 'make install-clang' ...
To be totally sure, I'll do a clean build followed by a 'make install-clang'...
cheers Chris
comment:10 Changed 13 years ago by cjones051073 (Chris Jones)
Yes, make install-clang does not install any of the development headers than a plain 'install' does
macmini ~/Projects/build > make install-clang llvm[0]: Install circumvented with NO_INSTALL llvm[1]: Installing Debug+Asserts /Users/chris/tmp/bin/clang llvm[1]: Installing Debug+Asserts /Users/chris/tmp/bin/clang++ llvm[1]: Installing compiler include file: altivec.h llvm[1]: Installing compiler include file: avx2intrin.h llvm[1]: Installing compiler include file: avxintrin.h llvm[1]: Installing compiler include file: bmi2intrin.h llvm[1]: Installing compiler include file: bmiintrin.h llvm[1]: Installing compiler include file: cpuid.h llvm[1]: Installing compiler include file: emmintrin.h llvm[1]: Installing compiler include file: float.h llvm[1]: Installing compiler include file: fma4intrin.h llvm[1]: Installing compiler include file: immintrin.h llvm[1]: Installing compiler include file: intrin.h llvm[1]: Installing compiler include file: iso646.h llvm[1]: Installing compiler include file: limits.h llvm[1]: Installing compiler include file: lzcntintrin.h llvm[1]: Installing compiler include file: mm3dnow.h llvm[1]: Installing compiler include file: mm_malloc.h llvm[1]: Installing compiler include file: mmintrin.h llvm[1]: Installing compiler include file: nmmintrin.h llvm[1]: Installing compiler include file: pmmintrin.h llvm[1]: Installing compiler include file: popcntintrin.h llvm[1]: Installing compiler include file: smmintrin.h llvm[1]: Installing compiler include file: stdalign.h llvm[1]: Installing compiler include file: stdarg.h llvm[1]: Installing compiler include file: stdbool.h llvm[1]: Installing compiler include file: stddef.h llvm[1]: Installing compiler include file: stdint.h llvm[1]: Installing compiler include file: tgmath.h llvm[1]: Installing compiler include file: tmmintrin.h llvm[1]: Installing compiler include file: unwind.h llvm[1]: Installing compiler include file: varargs.h llvm[1]: Installing compiler include file: wmmintrin.h llvm[1]: Installing compiler include file: x86intrin.h llvm[1]: Installing compiler include file: xmmintrin.h llvm[1]: Installing compiler include file: arm_neon.h llvm[1]: Installing compiler module map file: module.map llvm[1]: Installing Debug+Asserts Shared Library /Users/chris/tmp/lib/libclang.dylib llvm[1]: Installing Debug+Asserts Archive Library /Users/chris/tmp/lib/libclang.a llvm[1]: Installing Debug+Asserts /Users/chris/tmp/bin/c-index-test llvm[1]: Installing Clang C API include files llvm[1]: Making install directory /Users/chris/tmp/include/clang-c make[3]: Nothing to be done for `clang_darwin'. llvm[2]: Installing compiler runtime library: darwin/eprintf llvm[2]: Installing compiler runtime library: darwin/10.4 llvm[2]: Installing compiler runtime library: darwin/osx llvm[2]: Installing compiler runtime library: darwin/ios llvm[2]: Installing compiler runtime library: darwin/cc_kext llvm[2]: Installing compiler runtime library: darwin/asan_osx llvm[2]: Installing compiler runtime library: darwin/profile_osx llvm[2]: Installing compiler runtime library: darwin/profile_ios make[2]: Nothing to be done for `install'. llvm[1]: Packaging HTML documentation llvm[1]: Installing HTML documentation pod2html --css=manpage.css --htmlroot=. \ --podpath=. --infile=/Users/chris/Projects/llvm/tools/clang/docs/tools/clang.pod --outfile=/Users/chris/Projects/build/tools/clang/docs/tools/clang.html --title=clang llvm[2]: Installing HTML Clang Tools Documentation pod2man --release "clang 3.2" --center="Clang Tools Documentation" /Users/chris/Projects/llvm/tools/clang/docs/tools/clang.pod /Users/chris/Projects/build/tools/clang/docs/tools/clang.1 llvm[2]: Installing MAN Clang Tools Documentation groff -Tps -man /Users/chris/Projects/build/tools/clang/docs/tools/clang.1 > /Users/chris/Projects/build/tools/clang/docs/tools/clang.ps llvm[2]: Installing PS Clang Tools Documentation rm /Users/chris/Projects/build/tools/clang/docs/tools//.dir llvm[1]: Installing Debug+Asserts Shared Library /Users/chris/tmp/lib/libLTO.dylib llvm[1]: Installing Debug+Asserts Archive Library /Users/chris/tmp/lib/libLTO.a llvm[2]: Installing Debug+Asserts Shared Library /Users/chris/tmp/lib/libprofile_rt.dylib llvm[2]: Installing Debug+Asserts Archive Library /Users/chris/tmp/lib/libprofile_rt.a macmini ~/Projects/build > ls ~/tmp/include/* Index.h macmini ~/Projects/build > ls ~/tmp/include/ clang-c macmini ~/Projects/build > ls ~/tmp/include/* Index.h
So... What does this mean. Would it be possible to change the port to do a 'make install', so the full set of headers are also installed ?
Chris
comment:11 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Edit Makefile in the root of your checkout. Search for "tools/clang/include/clang-c" in the install-clang DIRS variable. Changing it to "tools/clang/include" should get your headers installed with install-clang.
It seems rather clear that these headers are intentionally not installed, and I'd like to know why that is before installing them. That being said, make the change locally, and hopefully it will be enough to unblock your progress.
comment:12 Changed 13 years ago by cjones051073 (Chris Jones)
Thanks, I'll give this a go this evening.
I can maybe understand why these aren't installed by default with install-clang, if they aren't needed just to use clang as a compiler, which is of course the most common use case. What ROOT is doing is quite different, it provides an interactive build environment, 'cling', based on clang, and this has quite different requirements. ROOT by default uses another interpreter, cint, which is based on gcc compilers, but I know the ROOT team long term want to try to move to cling (cint has many issues) so it would be great if we could find a way to get this going. Given that clang's 'make install' does install them, suggests to me at least at some level they acknowledge these APIs are sometimes useful to have installed.
cheers Chris
comment:13 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Ok, I buy it. Please test it for me though. Here's a patch to clang-3.1's install_target.patch which should make install-clang install these headers.
Index: files/install_target.patch =================================================================== --- files/install_target.patch (revision 92290) +++ files/install_target.patch (working copy) @@ -3,9 +3,10 @@ @@ -70,8 +70,7 @@ ifeq ($(MAKECMDGOALS),install-clang) DIRS := tools/clang/tools/driver tools/clang/lib/Headers \ tools/clang/tools/libclang tools/clang/tools/c-index-test \ - tools/clang/include/clang-c \ +- tools/clang/include/clang-c \ - tools/clang/runtime tools/clang/docs \ - tools/lto runtime ++ tools/clang/include \ + tools/clang/runtime tools/clang/docs OPTIONAL_DIRS := NO_INSTALL = 1
comment:14 Changed 13 years ago by cjones051073 (Chris Jones)
Thanks for the patch. Unfortunately, it does not seem to work for me. I don't see any clang headers under /opt/local/include. Where did you expect them to appear ?
(yes, I am pretty sure I ran my private patched version, and I ran with port -s to force a source install)
cheers Chris
comment:15 Changed 13 years ago by cjones051073 (Chris Jones)
Just to be clear, this is the patched patch I ran with, which I believe has your changes ?
macmini ~ > cat Projects/MacPorts/portfiles/lang/clang-3.1/files/install_target.patch --- a/Makefile.orig 2012-01-22 17:34:02.000000000 -0800 +++ b/Makefile 2012-01-22 17:34:14.000000000 -0800 @@ -70,8 +70,7 @@ ifeq ($(MAKECMDGOALS),install-clang) DIRS := tools/clang/tools/driver tools/clang/lib/Headers \ tools/clang/tools/libclang tools/clang/tools/c-index-test \ - tools/clang/include/clang-c \ - tools/clang/runtime tools/clang/docs \ - tools/lto runtime + tools/clang/include \ + tools/clang/runtime tools/clang/docs OPTIONAL_DIRS := NO_INSTALL = 1 endif
comment:16 Changed 13 years ago by cjones051073 (Chris Jones)
I should have checked the build log more carefully. The headers are there, just not where I expected them to be
macmini ~ > ls /opt/local/libexec/llvm-3.1/include/clang/* /opt/local/libexec/llvm-3.1/include/clang/ARCMigrate: ARCMT.h ARCMTActions.h FileRemapper.h /opt/local/libexec/llvm-3.1/include/clang/AST: APValue.h CanonicalType.h DeclarationName.h PrettyPrinter.h Type.h AST.h CharUnits.h DependentDiagnostic.h RecordLayout.h TypeLoc.h ASTConsumer.h Decl.h EvaluatedExprVisitor.h RecursiveASTVisitor.h TypeLocNodes.def ASTContext.h DeclAccessPair.h Expr.h Redeclarable.h TypeLocVisitor.h ASTDiagnostic.h DeclBase.h ExprCXX.h SelectorLocationsKind.h TypeNodes.def ASTImporter.h DeclCXX.h ExprObjC.h Stmt.h TypeOrdering.h ASTMutationListener.h DeclContextInternals.h ExternalASTSource.h StmtCXX.h TypeVisitor.h ASTVector.h DeclFriend.h GlobalDecl.h StmtGraphTraits.h UnresolvedSet.h Attr.h DeclGroup.h LambdaMangleContext.h StmtIterator.h VTTBuilder.h AttrImpl.inc DeclLookups.h Mangle.h StmtNodes.inc VTableBuilder.h Attrs.inc DeclNodes.inc NSAPI.h StmtObjC.h BaseSubobject.h DeclObjC.h NestedNameSpecifier.h StmtVisitor.h BuiltinTypes.def DeclTemplate.h OperationKinds.h TemplateBase.h CXXInheritance.h DeclVisitor.h ParentMap.h TemplateName.h /opt/local/libexec/llvm-3.1/include/clang/Analysis: Analyses CFG.h DomainSpecific Support AnalysisContext.h CFGStmtMap.h FlowSensitive Visitors AnalysisDiagnostic.h CallGraph.h ProgramPoint.h /opt/local/libexec/llvm-3.1/include/clang/Basic: ABI.h DiagnosticIDs.h OpenCLExtensions.def AddressSpaces.h DiagnosticIndexName.inc OperatorKinds.def AllDiagnostics.h DiagnosticLexKinds.inc OperatorKinds.h AttrKinds.h DiagnosticParseKinds.inc PartialDiagnostic.h AttrList.inc DiagnosticSemaKinds.inc PrettyStackTrace.h Builtins.def DiagnosticSerializationKinds.inc SourceLocation.h Builtins.h ExceptionSpecificationType.h SourceManager.h BuiltinsARM.def ExpressionTraits.h SourceManagerInternals.h BuiltinsHexagon.def FileManager.h Specifiers.h BuiltinsPPC.def FileSystemOptions.h TargetBuiltins.h BuiltinsPTX.def FileSystemStatCache.h TargetInfo.h BuiltinsX86.def IdentifierTable.h TargetOptions.h ConvertUTF.h LLVM.h TemplateKinds.h Diagnostic.h Lambda.h TokenKinds.def DiagnosticASTKinds.inc LangOptions.def TokenKinds.h DiagnosticAnalysisKinds.inc LangOptions.h TypeTraits.h DiagnosticCategories.h Linkage.h Version.h DiagnosticCommonKinds.inc MacroBuilder.h Version.inc DiagnosticDriverKinds.inc Module.h VersionTuple.h DiagnosticFrontendKinds.inc OnDiskHashTable.h Visibility.h DiagnosticGroups.inc OpenCL.h arm_neon.inc /opt/local/libexec/llvm-3.1/include/clang/CodeGen: BackendUtil.h CodeGenAction.h ModuleBuilder.h /opt/local/libexec/llvm-3.1/include/clang/Config: config.h /opt/local/libexec/llvm-3.1/include/clang/Driver: Action.h CC1Options.h Job.h Options.h Types.def Arg.h CC1Options.inc ObjCRuntime.h Options.inc Types.h ArgList.h Compilation.h OptSpecifier.h Phases.h Util.h CC1AsOptions.h Driver.h OptTable.h Tool.h CC1AsOptions.inc DriverDiagnostic.h Option.h ToolChain.h /opt/local/libexec/llvm-3.1/include/clang/Edit: Commit.h EditedSource.h EditsReceiver.h FileOffset.h Rewriters.h /opt/local/libexec/llvm-3.1/include/clang/Frontend: ASTConsumers.h CompilerInvocation.h HeaderSearchOptions.h SerializedDiagnosticPrinter.h ASTUnit.h DependencyOutputOptions.h LangStandard.h TextDiagnostic.h Analyses.def DiagnosticOptions.h LangStandards.def TextDiagnosticBuffer.h AnalyzerOptions.h DiagnosticRenderer.h LayoutOverrideSource.h TextDiagnosticPrinter.h ChainedDiagnosticConsumer.h FrontendAction.h LogDiagnosticPrinter.h Utils.h ChainedIncludesSource.h FrontendActions.h MigratorOptions.h VerifyDiagnosticConsumer.h CodeGenOptions.h FrontendDiagnostic.h MultiplexConsumer.h CommandLineSourceLoc.h FrontendOptions.h PreprocessorOptions.h CompilerInstance.h FrontendPluginRegistry.h PreprocessorOutputOptions.h /opt/local/libexec/llvm-3.1/include/clang/FrontendTool: Utils.h /opt/local/libexec/llvm-3.1/include/clang/Lex: AttrSpellings.inc LexDiagnostic.h MultipleIncludeOpt.h Preprocessor.h CodeCompletionHandler.h Lexer.h PPCallbacks.h PreprocessorLexer.h DirectoryLookup.h LiteralSupport.h PTHLexer.h ScratchBuffer.h ExternalPreprocessorSource.h MacroInfo.h PTHManager.h Token.h HeaderMap.h ModuleLoader.h Pragma.h TokenConcatenation.h HeaderSearch.h ModuleMap.h PreprocessingRecord.h TokenLexer.h /opt/local/libexec/llvm-3.1/include/clang/Parse: AttrLateParsed.inc ParseAST.h ParseDiagnostic.h Parser.h /opt/local/libexec/llvm-3.1/include/clang/Rewrite: ASTConsumers.h FixItRewriter.h HTMLRewrite.h Rewriter.h TokenRewriter.h DeltaTree.h FrontendActions.h RewriteRope.h Rewriters.h /opt/local/libexec/llvm-3.1/include/clang/Sema: AnalysisBasedWarnings.h DelayedDiagnostic.h Overload.h SemaDiagnostic.h AttrParsedAttrKinds.inc Designator.h Ownership.h SemaFixItUtils.h AttrParsedAttrList.inc ExternalSemaSource.h ParsedTemplate.h SemaInternal.h AttrTemplateInstantiate.inc IdentifierResolver.h PrettyDeclStackTrace.h Template.h AttributeList.h Initialization.h Scope.h TemplateDeduction.h CXXFieldCollector.h LocInfoType.h ScopeInfo.h TypoCorrection.h CodeCompleteConsumer.h Lookup.h Sema.h Weak.h DeclSpec.h ObjCMethodList.h SemaConsumer.h /opt/local/libexec/llvm-3.1/include/clang/Serialization: ASTBitCodes.h ASTWriter.h ContinuousRangeMap.h SerializationDiagnostic.h ASTDeserializationListener.h AttrPCHRead.inc Module.h ASTReader.h AttrPCHWrite.inc ModuleManager.h /opt/local/libexec/llvm-3.1/include/clang/StaticAnalyzer: Checkers Core Frontend /opt/local/libexec/llvm-3.1/include/clang/Tooling: CompilationDatabase.h Tooling.h macmini ~ >
Is that where you expected them to be ?
Chris
comment:17 Changed 13 years ago by cjones051073 (Chris Jones)
Just a thought, but would it be possible for 'port select clang' to also set a sym link for the selected clang version's include files, so they are linked to the 'normal' location /opt/local/include/clang ?
comment:18 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)
No. You are expected to use 'llvm-config-<version>' to figure out how to build against llvm. port select does set llvm-config correctly. If anything tries to build against the llvm SDK without using that, they're doing it wrong. You may want to file a bug against clint to use llvm-config to figure out its CPPFLAGS and CFLAGS
comment:19 Changed 13 years ago by cjones051073 (Chris Jones)
OK, I see. I suspect ROOT doesn't do things like that (They already say they don't support an llvm-config called anything other than 'llvm-config', i.e. without the versions we added). That of course is not your problem but theirs....
OK, I need to experiment with ROOT now, but I think your patch solves the problem from your side. Many many thanks...
cheers Chris
comment:20 Changed 13 years ago by cjones051073 (Chris Jones)
I just realised of course that 'sudo port select llvm mp-llvm-3.1' makes 'llvm-config' available under /opt/local/bin. Perfect.
cheers Chris
comment:21 Changed 13 years ago by cjones051073 (Chris Jones)
running a root build with your fix, I get a different issue (not a warning about missing headers)
clang++ -O2 -m64 -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -pthread -I/opt/local/libexec/llvm-3.1/include -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -O3 -g -fvisibility-inlines-hidden -fno-common -Woverloaded-virtual -Wcast-qual -I/Users/chris/Projects/root/cint/cling/include '-DR__LLVMDIR="/opt/local/libexec/llvm-3.1"' -Wno-shadow -Wno-unused-parameter -o core/meta/src/TCintWithCling.o -c /Users/chris/Projects/root/core/meta/src/TCintWithCling.cxx /Users/chris/Projects/root/core/meta/src/TCintWithCling.cxx:144:48: error: no member named 'configureModules' in 'clang::HeaderSearch' CI->getPreprocessor().getHeaderSearchInfo().configureModules(dictDir.Data(), "NONE"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ 1 error generated. make: *** [core/meta/src/TCintWithCling.o] Error 1
That looks to me just like an issue with root's support for clang 3.1. The headers where found, so as far as this report is concerned the issue is 'fixed'
thanks again.
Chris
comment:22 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)
They should support an LLVM_CONFIG environment variable which lets you provide the llvm-config that you want to use.
comment:23 Changed 13 years ago by cjones051073 (Chris Jones)
So progress has been made building cling, however there is a new problem. See comment
https://trac.macports.org/ticket/34171#comment:17
I've checked, and these clang<XYZ> libraries are indeed installed when I build from source with 'make install'
macmini ~/Projects/build > ls ~/tmp/lib/libclang* /Users/chris/tmp/lib/libclang.a /Users/chris/tmp/lib/libclangFrontendTool.a /Users/chris/tmp/lib/libclang.dylib /Users/chris/tmp/lib/libclangLex.a /Users/chris/tmp/lib/libclangARCMigrate.a /Users/chris/tmp/lib/libclangParse.a /Users/chris/tmp/lib/libclangAST.a /Users/chris/tmp/lib/libclangRewrite.a /Users/chris/tmp/lib/libclangAnalysis.a /Users/chris/tmp/lib/libclangSema.a /Users/chris/tmp/lib/libclangBasic.a /Users/chris/tmp/lib/libclangSerialization.a /Users/chris/tmp/lib/libclangCodeGen.a /Users/chris/tmp/lib/libclangStaticAnalyzerCheckers.a /Users/chris/tmp/lib/libclangDriver.a /Users/chris/tmp/lib/libclangStaticAnalyzerCore.a /Users/chris/tmp/lib/libclangEdit.a /Users/chris/tmp/lib/libclangStaticAnalyzerFrontend.a /Users/chris/tmp/lib/libclangFrontend.a /Users/chris/tmp/lib/libclangTooling.a
Could these please be added to the MacPorts build as well ?
cheers Chris
comment:25 Changed 13 years ago by cjones051073 (Chris Jones)
Sorry, but other than just run 'make install' other than 'make install-clang' I don't know how to hack the build to do this...
comment:26 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Can you figure out what path needs to be added in DIRS?
comment:27 Changed 13 years ago by cjones051073 (Chris Jones)
Thanks for the suggestions.
I'm not going to have time to look into this in the immediate short term, but unless someone beats me to it I will give it a go as soon as I can.
cheers Chris
comment:29 Changed 12 years ago by jeroen.hegeman@…
CC me as well. This would be very nice to get working!
comment:30 Changed 12 years ago by cjones051073 (Chris Jones)
Just got back to this.
Looking at my build area, it appears the libraries are built in Debug+Asserts/lib. So could this be added to the list of install DIRS ?
comment:31 Changed 12 years ago by cjones051073 (Chris Jones)
Small correction. In the MacPorts build the directory in the work are appears to be Release+Debug+Asserts/lib
However, I just ran a test with this area added to the DIRS in the patch file install_target.patch (for clang-3.2)
--- a/Makefile.orig 2012-01-22 17:34:02.000000000 -0800 +++ b/Makefile 2012-01-22 17:34:14.000000000 -0800 @@ -70,8 +70,7 @@ ifeq ($(MAKECMDGOALS),install-clang) DIRS := tools/clang/tools/driver tools/clang/lib/Headers \ tools/clang/tools/libclang tools/clang/tools/c-index-test \ - tools/clang/include/clang-c \ - tools/clang/runtime tools/clang/docs \ - tools/lto runtime + tools/clang/include Release+Debug+Asserts/lib \ + tools/clang/runtime tools/clang/docs OPTIONAL_DIRS := NO_INSTALL = 1 endif
and the build failed at the end with
:info:destroot make[1]: Entering directory `/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_portfiles_lang_clang-3.2/clang-3.2/work/trunk/Release+Debug+Asserts/lib' :info:destroot make[1]: *** No rule to make target `install'. Stop. :info:destroot make[1]: Leaving directory `/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_portfiles_lang_clang-3.2/clang-3.2/work/trunk/Release+Debug+Asserts/lib' :info:destroot make: *** [install] Error 1 :info:destroot make: Leaving directory `/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_portfiles_lang_clang-3.2/clang-3.2/work/trunk' :info:destroot Command failed: cd "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_portfiles_lang_clang-3.2/clang-3.2/work/trunk" && /usr/bin/make -w install-clang DESTDIR=/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_portfiles_lang_clang-3.2/clang-3.2/work/destroot :info:destroot Exit code: 2 :error:destroot org.macports.destroot for port clang-3.2 returned: command execution failed :debug:destroot Error code: CHILDSTATUS 75108 2 :debug:destroot Backtrace: command execution failed while executing "system -nice 0 $fullcmdstring" ("eval" body line 1) invoked from within "eval system $notty $nice \$fullcmdstring" invoked from within "command_exec destroot" (procedure "portdestroot::destroot_main" line 2) invoked from within "$procedure $targetname" :info:destroot Warning: targets not executed for clang-3.2: org.macports.activate org.macports.destroot org.macports.install :notice:destroot Please see the log file for port clang-3.2 for details: /opt/local/var/macports/logs/_Users_chris_Projects_MacPorts_portfiles_lang_clang-3.2/clang-3.2/main.log
Not sure what that means.... Maybe it doesn't like the directory name with + ??
Chris
comment:32 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)
That directory is the *build* directory. It is not the source directory. You need to include whichever subdirectory contains the Makefile responsible for installing those files.
comment:33 Changed 12 years ago by cjones051073 (Chris Jones)
Thanks ! That makes more sense. Changing the patch to include tools/clang/lib instead
--- a/Makefile.orig 2012-01-22 17:34:02.000000000 -0800 +++ b/Makefile 2012-01-22 17:34:14.000000000 -0800 @@ -70,8 +70,7 @@ ifeq ($(MAKECMDGOALS),install-clang) DIRS := tools/clang/tools/driver tools/clang/lib/Headers \ tools/clang/tools/libclang tools/clang/tools/c-index-test \ - tools/clang/include/clang-c \ - tools/clang/runtime tools/clang/docs \ - tools/lto runtime + tools/clang/include tools/clang/lib \ + tools/clang/runtime tools/clang/docs OPTIONAL_DIRS := NO_INSTALL = 1 endif
Seems to have worked fine. The libraries are now installed in /opt/local/libexec/llvm-3.2/lib.
So, would it be OK to add this to the patch file ? Similarly for Clang-3.1 if possible too ;)
cheers Chris
comment:34 follow-up: 35 Changed 12 years ago by cjones051073 (Chris Jones)
Another slightly OT question. Are there any plans to make clang-3.2 a valid compiler option in MacPorts ? If I try and make a variant of root using clang-3.2
configure.compiler macports-clang-3.2
This doesn't work
Error: org.macports.configure for port root returned: Invalid value for configure.compiler
I think root is more compatible with 3.2 than 3.1, so it would be good to have this if possible ?
Chris
comment:35 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Replying to jonesc@…:
Another slightly OT question. Are there any plans to make clang-3.2 a valid compiler option in MacPorts ? If I try and make a variant of root using clang-3.2
configure.compiler macports-clang-3.2This doesn't work
Error: org.macports.configure for port root returned: Invalid value for configure.compilerI think root is more compatible with 3.2 than 3.1, so it would be good to have this if possible ?
Chris
I added it months ago (April?). Make sure you're on current base trunk.
comment:36 follow-up: 37 Changed 12 years ago by cjones051073 (Chris Jones)
Ah I see. I try not to use non-released MacPorts versions, as there is no point my pushing changes to ports that don't work with the latest public release. Users would complain ;)
So I guess, my question should be do you known when it might get pushed out in a new MacPorts release ?
comment:37 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Replying to jonesc@…:
Ah I see. I try not to use non-released MacPorts versions, as there is no point my pushing changes to ports that don't work with the latest public release. Users would complain ;)
So I guess, my question should be do you known when it might get pushed out in a new MacPorts release ?
/shrug, sorry. I don't really follow the base release schedule. Ask jmr.
comment:38 Changed 12 years ago by cjones051073 (Chris Jones)
No worries. I'll follow that one up elsewhere.
Back to the libraries though, are you happen to include the update to the patch files ?\
many thanks for your help.
Chris
comment:39 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Yeah, I will, but I'm about to go away for a month, and I don't want to rock the boat too much. I will include it when I get back in early July, unless you absolutely must have it now.
comment:40 Changed 12 years ago by cjones051073 (Chris Jones)
No thats fine. I'm in no hurry (the cling variant of root needs more work anyway, and probably clang-3.2 as a compiler option first).
Just wanted to check it was OK
Chris
comment:41 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Cc Me!