Skip to content
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

issues compiling on Mac. #10

Open
sje30 opened this issue Jan 2, 2024 · 1 comment
Open

issues compiling on Mac. #10

sje30 opened this issue Jan 2, 2024 · 1 comment

Comments

@sje30
Copy link

sje30 commented Jan 2, 2024

Hi,

First, I've been able to compile altermime cleanly on a Ubuntu 22.04 system that is running gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

However, on my Mac, with either gcc or cc (versions below), then I get the following errors:

$ make -i
cc -Wall -Werror -g -I. -O2 -DALTERMIME_PRETEXT -c strstack.c
cc -Wall -Werror -g -I. -O2 -DALTERMIME_PRETEXT -c mime_alter.c
mime_alter.c:738:13: error: variable 'newblock' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
        } else if (lb[0] == '\n') {
                   ^~~~~~~~~~~~~
mime_alter.c:752:9: note: uninitialized use occurs here
        return newblock;
               ^~~~~~~~
mime_alter.c:738:9: note: remove the 'if' if its condition is always true
        } else if (lb[0] == '\n') {
               ^~~~~~~~~~~~~~~~~~~
mime_alter.c:719:16: note: initialize the variable 'newblock' to silence this warning
        char *newblock;
                      ^
                       = NULL
1 error generated.
make: [mime_alter.o] Error 1 (ignored)
cc -Wall -Werror -g -I. -O2 -DALTERMIME_PRETEXT -c ffget.c
ffget.c:553:20: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
                                if ( (*crlfpos == '\r') )
                                      ~~~~~~~~~^~~~~~~
ffget.c:553:20: note: remove extraneous parentheses around the comparison to silence this warning
                                if ( (*crlfpos == '\r') )
                                     ~         ^      ~
ffget.c:553:20: note: use '=' to turn this equality comparison into an assignment
                                if ( (*crlfpos == '\r') )
                                               ^~
                                               =
1 error generated.
make: [ffget.o] Error 1 (ignored)
cc -Wall -Werror -g -I. -O2 -DALTERMIME_PRETEXT -c pldstr.c
cc -Wall -Werror -g -I. -O2 -DALTERMIME_PRETEXT -c filename-filters.c
cc -Wall -Werror -g -I. -O2 -DALTERMIME_PRETEXT -c logger.c
cc -Wall -Werror -g -I. -O2 -DALTERMIME_PRETEXT -c MIME_headers.c
cc -Wall -Werror -g -I. -O2 -DALTERMIME_PRETEXT -c libmime-decoders.c
cc -Wall -Werror -g -I. -O2 -DALTERMIME_PRETEXT -c boundary-stack.c
cc -Wall -Werror -g -I. -O2 -DALTERMIME_PRETEXT -c qpe.c
cc -Wall -Werror -g -I. -O2 -DALTERMIME_PRETEXT altermime.c strstack.o mime_alter.o ffget.o pldstr.o filename-filters.o logger.o MIME_headers.o libmime-decoders.o boundary-stack.o qpe.o -o altermime
clang: error: no such file or directory: 'mime_alter.o'
clang: error: no such file or directory: 'ffget.o'

Versions of gcc/cc tested and OS:

$ uname -a
Darwin blur.local 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:24 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6000 arm64

$ gcc -v
Apple clang version 15.0.0 (clang-1500.0.40.1)
Target: arm64-apple-darwin23.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

$ cc -v 
Apple clang version 15.0.0 (clang-1500.0.40.1)
Target: arm64-apple-darwin23.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

(i.e. cc and gcc are same)

@sje30
Copy link
Author

sje30 commented Jan 2, 2024

I'll suggest a patch

sje30 added a commit to sje30/alterMIME that referenced this issue Jan 2, 2024
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

1 participant