[colm-users] bytecode.cpp:377 error during make

Edward Ocampo-Gooding edward.og at gmail.com
Tue Jul 14 02:34:22 UTC 2009


colm now compiles cleanly after updating to your latest version  
(awesome!), but trying the ruby example gives me a linker error:

edward at aspen ~/src/colm/trunk/test/ruby$ make
../../colm/colm ruby.lm
ld: in ../../colm, can't map file, errno=22
collect2: ld returned 1 exit status
there was a problem compiling the output
edward at aspen ~/src/colm/trunk/test/ruby$ ls
Makefile  ruby.cpp  ruby.lm

Would giving you vnc or ssh access to a OS 10 machine help?

On 13-Jul-09, at 10:27 PM, Adrian Thurston wrote:

> I just checked in a change that *should* fix the problem. I don't  
> have a
> darwin system to test on so I can't be sure. In any case, just newing
> the space for the vm stack will work.
>
> -Adrian
>
> Edward Ocampo-Gooding wrote:
>> This is me:
>>
>> $ uname -a
>> Darwin Aspen.local 9.7.0 Darwin Kernel Version 9.7.0: Tue Mar 31
>> 22:52:17 PDT 2009; root:xnu-1228.12.14~1/RELEASE_I386 i386
>>
>> (That’s OS 10.5.7)
>>
>> Attached is the mmap man page.
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>>
>>
>>
>> On 13-Jul-09, at 10:15 PM, Adrian Thurston wrote:
>>
>>
>>
>>> Here's a dirty fix that should get it to compile.
>>>
>>> What kind of system are you on? Could you go
>>>
>>> $ man mmap > mmap.txt
>>>
>>> and post that here?
>>>
>>> -Adrian
>>>
>>> Edward Ocampo-Gooding wrote:
>>>> Hi Adrian,
>>>> I tried compiling colm (revision 956) but ran into an error during
>>>> compilation. I haven’t taken a look to see what exactly is going  
>>>> on,
>>>> but am hoping that you know what’s up.
>>>> Here’s my terminal dump:
>>>> $ ./configure && make
>>>> checking for gcc... gcc
>>>> checking for C compiler default output file name... a.out
>>>> checking whether the C compiler works... yes
>>>> checking whether we are cross compiling... no
>>>> checking for suffix of executables...
>>>> checking for suffix of object files... o
>>>> checking whether we are using the GNU C compiler... yes
>>>> checking whether gcc accepts -g... yes
>>>> checking for gcc option to accept ISO C89... none needed
>>>> checking for g++... g++
>>>> checking whether we are using the GNU C++ compiler... yes
>>>> checking whether g++ accepts -g... yes
>>>> checking whether make sets $(MAKE)... yes
>>>> checking for ragel... ragel
>>>> checking for kelbt... kelbt
>>>> configure: creating ./config.status
>>>> config.status: creating Makefile
>>>> config.status: creating colm/Makefile
>>>> config.status: creating colm/config.h
>>>> configuration of colm complete
>>>> echo '#define VERSION "0.1.0"' > version.h
>>>> echo '#define PUBDATE "June 2008"' >> version.h
>>>> kelbt -o lmparse.h lmparse.kh
>>>> ragel -G2 -o lmscan.cpp lmscan.rl
>>>> kelbt -o lmparse.cpp lmparse.kl
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o compile.o compile.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o lmparse.o lmparse.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o lmscan.o lmscan.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o parsetree.o parsetree.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o parsedata.o parsedata.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o fsmstate.o fsmstate.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o fsmbase.o fsmbase.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o fsmattach.o fsmattach.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o fsmmin.o fsmmin.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o fsmgraph.o fsmgraph.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o pdagraph.o pdagraph.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o pdabuild.o pdabuild.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o pdacodegen.o pdacodegen.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o fsmcodegen.o fsmcodegen.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o redfsm.o redfsm.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o fsmexec.o fsmexec.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o main.o main.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o redbuild.o redbuild.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o closure.o closure.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o fsmap.o fsmap.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o dotgen.o dotgen.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o pcheck.o pcheck.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -DPREFIX='"/usr/ 
>>>> local"' -
>>>> I../aapl -o ctinput.o ctinput.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -I../aapl -o fsmrun_d.o
>>>> fsmrun.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -I../aapl -o pdarun_d.o
>>>> pdarun.cpp
>>>> g++ -c -g -Wall -Wwrite-strings -DCOLM_LOG -I../aapl -o  
>>>> bytecode_d.o
>>>> bytecode.cpp
>>>> bytecode.cpp: In function ‘Tree** stack_alloc()’:
>>>> bytecode.cpp:377: error: ‘MAP_ANONYMOUS’ was not declared in  
>>>> this  scope
>>>> make[1]: *** [bytecode_d.o] Error 1
>>>> make: *** [colm] Error 2
>>>> _______________________________________________
>>>> colm-users mailing list
>>>> colm-users at complang.org
>>>> http://www.complang.org/mailman/listinfo/colm-users
>>> Index: bytecode.cpp
>>> ===================================================================
>>> --- bytecode.cpp    (revision 956)
>>> +++ bytecode.cpp    (working copy)
>>> @@ -371,10 +371,10 @@
>>>
>>> Tree **stack_alloc()
>>> {
>>> -    //return new Tree*[VM_STACK_SIZE];
>>> +    return new Tree*[VM_STACK_SIZE];
>>>
>>> -    return (Tree**)mmap( 0, sizeof(Tree*)*VM_STACK_SIZE,
>>> -        PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, 0,  
>>> 0 );
>>> +    //return (Tree**)mmap( 0, sizeof(Tree*)*VM_STACK_SIZE,
>>> +    //    PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, 0,  
>>> 0 );
>>> }
>>>
>>> void Program::run()
>>> _______________________________________________
>>> colm-users mailing list
>>> colm-users at complang.org
>>> http://www.complang.org/mailman/listinfo/colm-users
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> colm-users mailing list
>> colm-users at complang.org
>> http://www.complang.org/mailman/listinfo/colm-users
>
> _______________________________________________
> colm-users mailing list
> colm-users at complang.org
> http://www.complang.org/mailman/listinfo/colm-users





More information about the colm-users mailing list