Don't try to link objects when code generation failed #17

Closed
opened 2025-10-26 13:32:18 +01:00 by pkulev · 1 comment
pkulev commented 2025-10-26 13:32:18 +01:00 (Migrated from github.com)
most@hpc ~/p/sex (feature/project-local-deps)> ./sexc example/lambdas.sex -o lambdas.exe

Error: (map) bad argument type - not a list: |__lambda_0_()|

	Call history:

	fmt-c-writer.scm:252: walk-function	 
	fmt-c-writer.scm:191: walk-fn-def	 
	fmt-c-writer.scm:153: walk-type	 
	fmt-c-writer.scm:109: failure1027	 
	fmt-c-writer.scm:109: failure1038	 
	fmt-c-writer.scm:109: fk21333	 
	fmt-c-writer.scm:109: failure1049	 
	fmt-c-writer.scm:109: failure1060	 
	fmt-c-writer.scm:136: type-convert-to-c	 
	fmt-c-writer.scm:143: atom-to-fmt-c	 
	fmt-c-writer.scm:46: unkebabify	 
	fmt-c-writer.scm:27: scheme#symbol->string	 
	fmt-c-writer.scm:26: regex#string-substitute	 
	fmt-c-writer.scm:25: scheme#string->symbol	 
	fmt-c-writer.scm:154: atom-to-fmt-c	 
	fmt-c-writer.scm:155: walk-arglist	 	<--
most@hpc ~/p/sex (feature/project-local-deps) [70]> /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../lib64/Scrt1.o: in function `_start':
(.text+0x1b): undefined reference to `main'
collect2: error: ld returned 1 exit status
``` most@hpc ~/p/sex (feature/project-local-deps)> ./sexc example/lambdas.sex -o lambdas.exe Error: (map) bad argument type - not a list: |__lambda_0_()| Call history: fmt-c-writer.scm:252: walk-function fmt-c-writer.scm:191: walk-fn-def fmt-c-writer.scm:153: walk-type fmt-c-writer.scm:109: failure1027 fmt-c-writer.scm:109: failure1038 fmt-c-writer.scm:109: fk21333 fmt-c-writer.scm:109: failure1049 fmt-c-writer.scm:109: failure1060 fmt-c-writer.scm:136: type-convert-to-c fmt-c-writer.scm:143: atom-to-fmt-c fmt-c-writer.scm:46: unkebabify fmt-c-writer.scm:27: scheme#symbol->string fmt-c-writer.scm:26: regex#string-substitute fmt-c-writer.scm:25: scheme#string->symbol fmt-c-writer.scm:154: atom-to-fmt-c fmt-c-writer.scm:155: walk-arglist <-- most@hpc ~/p/sex (feature/project-local-deps) [70]> /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../lib64/Scrt1.o: in function `_start': (.text+0x1b): undefined reference to `main' collect2: error: ld returned 1 exit status ```

I believe we have fixed it in #27, namely commit 85bf1c1

I believe we have fixed it in #27, namely commit 85bf1c1
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: alex-eg/sex#17