8000 CIL throws syntax error for file wget1.14/lib/md5.c during compilation to create the library libgnu.a · Issue #36 · cil-project/cil · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

CIL throws syntax error for file wget1.14/lib/md5.c during compilation to create the library libgnu.a #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sensorhound-akash opened this issue Oct 20, 2017 · 1 comment

Comments

@sensorhound-akash
Copy link
sensorhound-akash commented Oct 20, 2017

I am trying to compile Wget-1.14 source code with CIL. I made the default configuration of the Makefile in wget-1.14/lib/Makefile from:

AR = ar
ARFLAGS = cru
CC = gcc
CFLAGS = -g -O2 -Wall -pthread -static

to

AR =  cilly --save-temps=build  --merge --keepmerged --mode=AR
ARFLAGS = r
CC =  cilly --save-temps=build --merge --keepmerged
CFLAGS = -g -O2 -Wall -pthread -static

When the make file is run, to create the library libgnu.a the following command is run as the last step:

cilly --save-temps=build  --merge --keepmerged --mode=AR r libgnu.a base32.o c-ctype.o c-strcasecmp.o c-strncasecmp.o cloexec.o md5.o sha1.o dirname-lgpl.o basename-lgpl.o stripslash.o exitfail.o fatal-signal.o fd-hook.o fd-safer-flag.o dup-safer-flag.o gettime.o localcharset.o glthread/lock.o pipe2.o pipe2-safer.o quotearg.o sockets.o spawn-pipe.o stat-time.o tempname.o glthread/threadlib.o timespec.o tmpdir.o dup-safer.o fd-safer.o pipe-safer.o utimens.o wait-process.o xmalloc.o xalloc-die.o asnprintf.o fcntl.o futimens.o getpass.o ioctl.o printf-args.o printf-parse.o strerror_r.o vasnprintf.o

On running this command, the following error is thrown at line 258 of md5.c:

Library libgnu.a not found; creating. at *******
Turning off warn-is-error flag 
***/cil/obj/x86_LINUX/cilly.asm.exe --extrafiles ___extra_files --mergedout libgnu.a
md5.c[258:0-0] : syntax error
Parsing errorFatal error: exception Frontc.ParseError("Parse error")
Makefile:1383: recipe for target 'libgnu.a' failed
make[2]: *** [libgnu.a] Error 2

The code for md5.c from line 258 is in function md5_process_bytes. Lines 253-273 looks like:

253   /* Process available complete blocks.  */
254   if (len >= 64)
255     {
256 #if !_STRING_ARCH_unaligned
257 # define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) != 0)
258       if (UNALIGNED_P (buffer)){
259         while (len > 64)
260           {
261             md5_process_block (memcpy (ctx->buffer, buffer, 64), 64, ctx);
262             buffer = (const char *) buffer + 64;
263             len -= 64;
264           }
265         }
266       else
267 #endif
268         {
269           md5_process_block (buffer, len & ~63, ctx);
270           buffer = (const char *) buffer + (len & ~63);
271           len &= 63;
272         }
273     }

I hope if anyone can share your opinions and suggestions on the potential syntactical error that CIL might be encountering.

Thanks in advance.

@kerneis
Copy link
Contributor
kerneis commented Nov 2, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0