Skip to content

Instantly share code, notes, and snippets.

@adragomir
Created August 28, 2010 14:07
Show Gist options
  • Save adragomir/555161 to your computer and use it in GitHub Desktop.
Save adragomir/555161 to your computer and use it in GitHub Desktop.
Creating bin/ in case it does not exist.
mkdir -p bin/
Compiling from C source
cd build/ && ROCK_DIST=.. make
Finished compiling for arch osx
gcc -I c-source -I ../libs/headers/ -g -std=gnu99 -Wall -D__OOC_USE_GC__ -w -DROCK_BUILD_DATE="\"bootstrapped\"" -DROCK_BUILD_TIME="\"\"" c-source/source/rock/rock.o c-source/sdk/lang/Numbers.o c-source/sdk/lang/types.o c-source/sdk/lang/Iterators.o c-source/sdk/lang/String.o c-source/sdk/lang/Exception.o c-source/sdk/lang/IO.o c-source/sdk/lang/System.o c-source/sdk/lang/Memory.o c-source/sdk/text/Buffer.o c-source/sdk/io/Writer.o c-source/sdk/io/Reader.o c-source/sdk/structs/ArrayList.o c-source/sdk/structs/List.o c-source/sdk/math/Random.o c-source/sdk/os/Time.o c-source/sdk/structs/HashMap.o c-source/source/rock/frontend/CommandLine.o c-source/sdk/io/File.o c-source/sdk/io/FileReader.o c-source/sdk/io/FileWriter.o c-source/sdk/io/native/FileWin32.o c-source/sdk/native/win32/types.o c-source/sdk/io/native/FileUnix.o c-source/sdk/os/Terminal.o c-source/sdk/os/unistd.o c-source/sdk/os/Process.o c-source/sdk/os/Pipe.o c-source/sdk/os/native/PipeUnix.o c-source/sdk/os/FileDescriptor.o c-source/sdk/os/native/PipeWin32.o c-source/sdk/native/win32/errors.o c-source/sdk/os/PipeReader.o c-source/sdk/os/native/ProcessUnix.o c-source/sdk/os/Env.o c-source/sdk/os/wait.o c-source/sdk/os/native/ProcessWin32.o c-source/sdk/structs/Stack.o c-source/sdk/text/StringTokenizer.o c-source/source/rock/RockVersion.o c-source/source/rock/frontend/Help.o c-source/source/rock/frontend/Token.o c-source/source/rock/frontend/BuildParams.o c-source/source/rock/frontend/compilers/AbstractCompiler.o c-source/source/rock/frontend/PathList.o c-source/source/rock/utils/ShellUtils.o c-source/source/rock/middle/Module.o c-source/sdk/text/EscapeSequence.o c-source/sdk/math.o c-source/sdk/structs/OrderedMultiMap.o c-source/sdk/structs/MultiMap.o c-source/source/rock/frontend/AstBuilder.o c-source/source/rock/utils/FileUtils.o c-source/source/rock/middle/tinker/Errors.o c-source/source/rock/middle/tinker/Trail.o c-source/source/rock/middle/Node.o c-source/source/rock/middle/Visitor.o c-source/source/rock/middle/Return.o c-source/source/rock/middle/Statement.o c-source/source/rock/middle/Expression.o c-source/source/rock/middle/Type.o c-source/source/rock/backend/cnaughty/AwesomeWriter.o c-source/source/rock/io/TabbedWriter.o c-source/source/rock/middle/Declaration.o c-source/source/rock/middle/VariableDecl.o c-source/source/rock/middle/TypeDecl.o c-source/source/rock/middle/ClassDecl.o c-source/source/rock/middle/Cast.o c-source/source/rock/middle/FunctionCall.o c-source/source/rock/middle/FunctionDecl.o c-source/source/rock/middle/Argument.o c-source/source/rock/middle/VariableAccess.o c-source/source/rock/middle/BinaryOp.o c-source/source/rock/middle/OperatorDecl.o c-source/source/rock/middle/tinker/Resolver.o c-source/source/rock/middle/Import.o c-source/source/rock/middle/tinker/Response.o c-source/source/rock/middle/tinker/Tinkerer.o c-source/source/rock/middle/CoverDecl.o c-source/source/rock/middle/AddressOf.o c-source/source/rock/middle/ArrayAccess.o c-source/source/rock/middle/ArrayCreation.o c-source/source/rock/middle/NullLiteral.o c-source/source/rock/middle/Literal.o c-source/source/rock/middle/BaseType.o c-source/source/rock/middle/InterfaceDecl.o c-source/source/rock/middle/FuncType.o c-source/source/rock/middle/PropertyDecl.o c-source/source/rock/middle/Block.o c-source/source/rock/middle/ControlStatement.o c-source/source/rock/middle/Scope.o c-source/source/rock/middle/Version.o c-source/source/rock/middle/Tuple.o c-source/source/rock/middle/TypeList.o c-source/source/rock/middle/StructLiteral.o c-source/source/rock/middle/NamespaceDecl.o c-source/source/rock/middle/EnumDecl.o c-source/source/rock/middle/InlineContext.o c-source/source/rock/middle/algo/autoReturn.o c-source/source/rock/middle/Conditional.o c-source/source/rock/middle/If.o c-source/source/rock/middle/Else.o c-source/source/rock/middle/IntLiteral.o c-source/source/rock/middle/StringLiteral.o c-source/source/rock/middle/Dereference.o c-source/source/rock/middle/CommaSequence.o c-source/source/rock/middle/ArrayLiteral.o c-source/source/rock/middle/InterfaceImpl.o c-source/source/rock/middle/Addon.o c-source/source/rock/middle/While.o c-source/source/rock/middle/Foreach.o c-source/source/rock/middle/RangeLiteral.o c-source/source/rock/middle/CharLiteral.o c-source/source/rock/middle/BoolLiteral.o c-source/source/rock/middle/FloatLiteral.o c-source/source/rock/middle/Parenthesis.o c-source/source/rock/middle/Comparison.o c-source/source/rock/middle/Ternary.o c-source/source/rock/middle/UnaryOp.o c-source/source/rock/middle/Match.o c-source/source/rock/middle/FlowControl.o c-source/source/rock/middle/Include.o c-source/source/rock/middle/Use.o c-source/source/rock/middle/UseDef.o c-source/source/rock/middle/CallChain.o c-source/source/rock/frontend/compilers/Gcc.o c-source/source/rock/frontend/compilers/BaseCompiler.o c-source/source/rock/frontend/compilers/Clang.o c-source/source/rock/frontend/compilers/Icc.o c-source/source/rock/frontend/compilers/Tcc.o c-source/source/rock/frontend/drivers/Driver.o c-source/source/rock/frontend/pkgconfig/PkgInfo.o c-source/source/rock/frontend/pkgconfig/PkgConfigFrontend.o c-source/source/rock/frontend/drivers/CombineDriver.o c-source/source/rock/frontend/Target.o c-source/source/rock/backend/cnaughty/CGenerator.o c-source/source/rock/io/CachedFileWriter.o c-source/source/rock/backend/cnaughty/Skeleton.o c-source/source/rock/backend/cnaughty/FunctionDeclWriter.o c-source/source/rock/backend/cnaughty/ClassDeclWriter.o c-source/source/rock/backend/cnaughty/VersionWriter.o c-source/source/rock/backend/cnaughty/ControlStatementWriter.o c-source/source/rock/backend/cnaughty/ModuleWriter.o c-source/source/rock/backend/cnaughty/CoverDeclWriter.o c-source/source/rock/backend/cnaughty/TypeWriter.o c-source/source/rock/backend/cnaughty/FunctionCallWriter.o c-source/source/rock/backend/cnaughty/CastWriter.o c-source/source/rock/backend/cnaughty/InterfaceDeclWriter.o c-source/source/rock/frontend/drivers/SequenceDriver.o c-source/source/rock/frontend/drivers/Archive.o c-source/source/rock/frontend/drivers/MakeDriver.o c-source/source/rock/frontend/drivers/DummyDriver.o c-source/source/rock/backend/json/JSONGenerator.o c-source/sdk/structs/Bag.o c-source/sdk/structs/HashBag.o c-source/sdk/text/json/Generator.o c-source/sdk/text/json/Parser.o c-source/sdk/text/StringReader.o c-source/source/rock/backend/explain/ExplanationGenerator.o c-source/source/rock/frontend/NagaQueen.c -o ../bin/c_rock -lm -lpthread ../libs/osx/libgc.a
Now re-compiling ourself
OOC=bin/c_rock ROCK_DIST=. make self
mkdir -p .libs
gcc -std=c99 source/rock/frontend/NagaQueen.c -O3 -fomit-frame-pointer -D__OOC_USE_GC__ -w -c -o .libs/NagaQueen.o
mkdir -p bin/
bin/c_rock -sourcepath=source -v +-O0 -g -ignoredefine=ROCK_BUILD_ +-w +-DROCK_BUILD_DATE=\"2010-08-28\" +-DROCK_BUILD_TIME=\"17:04\" rock/rock -o=bin/rock .libs/NagaQueen.o
Parsing /Users/adragomi/temp/svn_other_projects/rock/sdk/lang/types.oocc
sdk/lang/types.ooc:3:10 WARNING Unknown version id: '_MSC_VER', compiling anyway (who knows?)
version(!_MSC_VER) {
~~~~~~~~
Finished parsing, now tinkering...
source/rock/backend/explain/ExplanationGenerator.ooc:118:32 ERROR Undefined type 'V'
node functions each( | f | f accept(this))
~
[FAIL]
make[1]: *** [self] Error 1
make: *** [bootstrap] Error 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment