Re: csm static build fails on yaml egg

2022-06-11 Thread Matt Welland
Ok. csm is helpful but not a magic bullet. I assumed that because "csm
-program yamltest" worked without additional switches etc I could merely
add -static to get a static build. Adding all.options and yamltest.options
with the needed info works:

cat all.options
-program yamltest -C -I/usr/include

cat yamltest.options
L -L/usr/lib/x86_64-linux-gnu -L -lyaml -static -L -static -L -lm -L
-ldl> ldd yamltest

$ file yamltest
yamltest: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux),
statically linked, for GNU/Linux 3.2.0,
BuildID[sha1]=642844535ad617a9378ce2ff7a7616e74dcdd940, not stripped

Thanks Felix.

On Sat, Jun 11, 2022 at 4:32 PM  wrote:

> > This is on ubuntu, chicken 5.3:
> >
> > Test code:
> > (module yamltest *
> > (import scheme
> > chicken.string
> > yaml)
> > (write (yaml-load "test.yaml")))
> >
> > > csm -static -program yamltest
> >   '/home/ubuntu/data/buildall/w23-0-ck5.3/bin/csc' '-o' 'yamltest' '-I'
> > '/home/ubuntu/data/opensrc/testsnips/yaml_static' '-C' '-I' '-C'
> > '/home/ubuntu/data/opensrc/testsnips/yaml_static' '-static'
> > '/home/ubuntu/data/opensrc/testsnips/yaml_static/yamltest.scm'
> > /home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o: In function
> > `f_3911':
> > yaml.static.c:(.text+0xae1c): undefined reference to `yaml_parser_delete'
> > yaml.static.c:(.text+0xae48): undefined reference to `yaml_parser_delete'
>
> Does this egg require an external library to be linked? It looks like it
> does. You need to add that.
>
>
> felix
>
>

-- 
--
Complexity is your enemy. Any fool can make something complicated.
It is hard to keep things simple. - Richard Branson.


Re: csm static build fails on yaml egg

2022-06-11 Thread felix . winkelmann
> This is on ubuntu, chicken 5.3:
>
> Test code:
> (module yamltest *
> (import scheme
> chicken.string
> yaml)
> (write (yaml-load "test.yaml")))
>
> > csm -static -program yamltest
>   '/home/ubuntu/data/buildall/w23-0-ck5.3/bin/csc' '-o' 'yamltest' '-I'
> '/home/ubuntu/data/opensrc/testsnips/yaml_static' '-C' '-I' '-C'
> '/home/ubuntu/data/opensrc/testsnips/yaml_static' '-static'
> '/home/ubuntu/data/opensrc/testsnips/yaml_static/yamltest.scm'
> /home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o: In function
> `f_3911':
> yaml.static.c:(.text+0xae1c): undefined reference to `yaml_parser_delete'
> yaml.static.c:(.text+0xae48): undefined reference to `yaml_parser_delete'

Does this egg require an external library to be linked? It looks like it
does. You need to add that.


felix




csm static build fails on yaml egg

2022-06-11 Thread Matt Welland
This is on ubuntu, chicken 5.3:

Test code:
(module yamltest *
(import scheme
chicken.string
yaml)
(write (yaml-load "test.yaml")))

> csm -static -program yamltest
  '/home/ubuntu/data/buildall/w23-0-ck5.3/bin/csc' '-o' 'yamltest' '-I'
'/home/ubuntu/data/opensrc/testsnips/yaml_static' '-C' '-I' '-C'
'/home/ubuntu/data/opensrc/testsnips/yaml_static' '-static'
'/home/ubuntu/data/opensrc/testsnips/yaml_static/yamltest.scm'
/home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o: In function
`f_3911':
yaml.static.c:(.text+0xae1c): undefined reference to `yaml_parser_delete'
yaml.static.c:(.text+0xae48): undefined reference to `yaml_parser_delete'
/home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o: In function
`f_3542':
yaml.static.c:(.text+0xb15c): undefined reference to `yaml_event_delete'
yaml.static.c:(.text+0xb188): undefined reference to `yaml_event_delete'
/home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o: In function
`f_3758':
yaml.static.c:(.text+0xb597): undefined reference to
`yaml_mapping_start_event_initialize'
/home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o: In function
`f_3708':
yaml.static.c:(.text+0xb884): undefined reference to
`yaml_sequence_start_event_initialize'
/home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o: In function
`f_3664':
yaml.static.c:(.text+0xbb12): undefined reference to
`yaml_scalar_event_initialize'
/home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o: In function
`f_2045':
yaml.static.c:(.text+0xbedb): undefined reference to `yaml_emitter_delete'
yaml.static.c:(.text+0xbf07): undefined reference to `yaml_emitter_delete'
/home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o: In function
`f_3905':
yaml.static.c:(.text+0xd9d5): undefined reference to
`yaml_parser_initialize'
yaml.static.c:(.text+0xd9e1): undefined reference to
`yaml_parser_initialize'
/home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o: In function
`f_3561':
yaml.static.c:(.text+0xda7f): undefined reference to `yaml_emitter_emit'
/home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o: In function
`f_2100':
yaml.static.c:(.text+0xdc02): undefined reference to
`yaml_document_start_event_initialize'
/home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o: In function
`f_2256':
yaml.static.c:(.text+0xe1b1): undefined reference to
`yaml_mapping_end_event_initialize'
/home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o: In function
`f_2075':
yaml.static.c:(.text+0xe274): undefined reference to
`yaml_stream_end_event_initialize'
/home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o: In function
`f_2228':
yaml.static.c:(.text+0xe337): undefined reference to
`yaml_sequence_end_event_initialize'
/home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o: In function
`f_2268':
yaml.static.c:(.text+0xe5d6): undefined reference to
`yaml_alias_event_initialize'
/home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o: In function
`f_3762':
yaml.static.c:(.text+0xe6ca): undefined reference to
`yaml_mapping_start_event_initialize'
/home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o: In function
`f_3712':
yaml.static.c:(.text+0xe7be): undefined reference to
`yaml_sequence_start_event_initialize'
/home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o: In function
`f_2172':
yaml.static.c:(.text+0xe8a4): undefined reference to
`yaml_document_end_event_initialize'
/home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o: In function
`f_2063':
yaml.static.c:(.text+0xe98b): undefined reference to
`yaml_stream_start_event_initialize'
/home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o: In function
`f_1969':
yaml.static.c:(.text+0xea5c): undefined reference to
`yaml_emitter_initialize'
yaml.static.c:(.text+0xea79): undefined reference to
`yaml_emitter_initialize'
yaml.static.c:(.text+0xea85): undefined reference to
`yaml_emitter_set_unicode'
yaml.static.c:(.text+0xea91): undefined reference to
`yaml_emitter_set_indent'
yaml.static.c:(.text+0xeaa2): undefined reference to
`yaml_emitter_set_unicode'
yaml.static.c:(.text+0xeac0): undefined reference to
`yaml_emitter_set_indent'
yaml.static.c:(.text+0xeb04): undefined reference to
`yaml_emitter_set_output_file'
yaml.static.c:(.text+0xeb53): undefined reference to
`yaml_emitter_set_output_file'
/home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o: In function
`f_3006':
yaml.static.c:(.text+0xece4): undefined reference to
`yaml_parser_set_input_file'
yaml.static.c:(.text+0xedda): undefined reference to
`yaml_parser_set_input_string'
/home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o: In function
`f_3302':
yaml.static.c:(.text+0xfaa0): undefined reference to `yaml_parser_parse'
collect2: error: ld returned 1 exit status

Error: shell command terminated with non-zero exit status 256: 'gcc'
'yamltest.o' '/home/ubuntu/data/buildall/w23-0-ck5.3/lib/chicken/11/yaml.o'