[colm] patch for colm to handle with '-I' and '-L' command line options

Adrian Thurston thurston at colm.net
Mon Jan 2 16:09:47 UTC 2017


Haha, hacky new year to you too!

So just testing it out and I get a failure on compilation in source.

compiling with: 'gcc -Wall -Wwrite-strings -g -lcolm -o tmp tmp.c 
-I/home/thurston/pkgs/colm/include -L/home/thurston/pkgs/colm/lib'
/tmp/ccc1LnSi.o: In function `colm_object_host_call':
/home/thurston/devel/colm/src/tmp.c:383: undefined reference to 
`vm_bs_add'
/tmp/ccc1LnSi.o: In function `colm_object_commit_reduce_forward':
/home/thurston/devel/colm/src/tmp.c:389: undefined reference to 
`commit_clear_parse_tree'
/tmp/ccc1LnSi.o: In function `main':
/home/thurston/devel/colm/src/tmp.c:402: undefined reference to 
`colm_new_program'
/home/thurston/devel/colm/src/tmp.c:403: undefined reference to 
`colm_set_debug'
/home/thurston/devel/colm/src/tmp.c:404: undefined reference to 
`colm_run_program'
/home/thurston/devel/colm/src/tmp.c:405: undefined reference to 
`colm_delete_program'
collect2: error: ld returned 1 exit status
error: colm: there was a problem compiling the output

Looks like because the order of things has changed. -lcolm is before the 
objects.

I just added a coding convention file to the doc directory. I've never 
been very strict with that in the past, however, colm and ragel are now 
part of the Colm Networks code base and I'd like to maintain some 
consistency.

Thanks!

Adrian

On 2017-01-01 05:00, Peter Reijnders wrote:
> Hacky newyear!
> 
> Sorry. My bad. My git-foo is not so strong.
> 
> Here is a new patch, from my branch, without any whitespace ignores.
> 
> ```
> # thefollowing seems to work
> git checkout master
> git apply --stat /tmp/colm-refractor-gcc-cmd.patch
> git apply --check /tmp/colm-refractor-gcc-cmd.patch
> git apply /tmp/colm-refractor-gcc-cmd.patch
> ```
> 
> 
> Peter Reijnders
> 
> 
> On Sat, 2016-12-31 at 18:49 -0330, Adrian Thurston wrote:
>> Hi Peter,
>> 
>> I can't seem to get the patch to apply. I don't have the base commit.
>> Maybe there is a missing intermediate commit?
>> 
>> Thanks,
>>   Adrian
>> 
>> On 2016-12-31 06:58, Peter Reijnders wrote:
>> > hello
>> >
>> > I found it quite cumbersome to 'make install' and 'make uninstall' to
>> > assert that colm uses the correct headers.
>> > Upon further analyzing it turned out that:
>> > 1) the '-I' command line option was not active
>> > 2) there were 2 almost identical functions that to build the gcc
>> > commands.
>> > After refractoring and testing, I added also the '-L' command line
>> > argument to extend the library path.
>> >
>> > With these 2 command line options working, it is possible to use colm
>> > from an arbitrary directory.
>> >
>> >
>> > I hope that the attached patch is usefull for somebody to ease
>> > development.
>> >
>> > Peter Reijnders
>> >
>> >
>> > _______________________________________________
>> > colm mailing list
>> > colm at colm.net
>> > http://www.colm.net/cgi-bin/mailman/listinfo/colm
>> 
>> _______________________________________________
>> colm mailing list
>> colm at colm.net
>> http://www.colm.net/cgi-bin/mailman/listinfo/colm




More information about the colm-users mailing list