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

Compile on macOS? #20

Closed
luckman212 opened this issue Sep 16, 2018 · 5 comments
Closed

Compile on macOS? #20

luckman212 opened this issue Sep 16, 2018 · 5 comments

Comments

@luckman212
Copy link

I would really like to compile netcalc on macOS, but fell on my face.

configure runs fine (no errors). But make spews out the following wall of text and then fails. Any possible clue or is this a dead end?

$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in src
  CC       netcalc-netcalc.o
In file included from netcalc.c:40:
./netcalc.h:232:8: error: expected parameter declarator
size_t strlcpy(char *dst, const char *src, size_t siz);
       ^
/usr/include/secure/_string.h:108:47: note: expanded from macro 'strlcpy'
                __builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                                                            ^
/usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
                                                             ^
/usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'
#    define _USE_FORTIFY_LEVEL 2
                               ^
In file included from netcalc.c:40:
./netcalc.h:232:8: error: expected ')'
/usr/include/secure/_string.h:108:47: note: expanded from macro 'strlcpy'
                __builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                                                            ^
/usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
                                                             ^
/usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'
#    define _USE_FORTIFY_LEVEL 2
                               ^
./netcalc.h:232:8: note: to match this '('
/usr/include/secure/_string.h:108:47: note: expanded from macro 'strlcpy'
                __builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                                                            ^
/usr/include/secure/_common.h:39:53: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
                                                    ^
In file included from netcalc.c:40:
./netcalc.h:232:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
size_t strlcpy(char *dst, const char *src, size_t siz);
       ^
/usr/include/secure/_string.h:108:47: note: expanded from macro 'strlcpy'
                __builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                                                            ^
/usr/include/secure/_common.h:39:31: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
                              ^
In file included from netcalc.c:40:
./netcalc.h:232:8: error: conflicting types for '__builtin___strlcpy_chk'
/usr/include/secure/_string.h:108:3: note: expanded from macro 'strlcpy'
                __builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                ^
./netcalc.h:232:8: note: '__builtin___strlcpy_chk' is a builtin with type 'unsigned long (char *, const char *, unsigned
      long, unsigned long)'
/usr/include/secure/_string.h:108:3: note: expanded from macro 'strlcpy'
                __builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                ^
In file included from netcalc.c:40:
./netcalc.h:233:8: error: expected parameter declarator
size_t strlcat(char *dst, const char *src, size_t siz);
       ^
/usr/include/secure/_string.h:115:47: note: expanded from macro 'strlcat'
                __builtin___strlcat_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                                                            ^
/usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
                                                             ^
/usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'
#    define _USE_FORTIFY_LEVEL 2
                               ^
In file included from netcalc.c:40:
./netcalc.h:233:8: error: expected ')'
/usr/include/secure/_string.h:115:47: note: expanded from macro 'strlcat'
                __builtin___strlcat_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                                                            ^
/usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
                                                             ^
/usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'
#    define _USE_FORTIFY_LEVEL 2
                               ^
./netcalc.h:233:8: note: to match this '('
/usr/include/secure/_string.h:115:47: note: expanded from macro 'strlcat'
                __builtin___strlcat_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                                                            ^
/usr/include/secure/_common.h:39:53: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
                                                    ^
In file included from netcalc.c:40:
./netcalc.h:233:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
size_t strlcat(char *dst, const char *src, size_t siz);
       ^
/usr/include/secure/_string.h:115:47: note: expanded from macro 'strlcat'
                __builtin___strlcat_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                                                            ^
/usr/include/secure/_common.h:39:31: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
                              ^
In file included from netcalc.c:40:
./netcalc.h:233:8: error: conflicting types for '__builtin___strlcat_chk'
/usr/include/secure/_string.h:115:3: note: expanded from macro 'strlcat'
                __builtin___strlcat_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                ^
./netcalc.h:233:8: note: '__builtin___strlcat_chk' is a builtin with type 'unsigned long (char *, const char *, unsigned
      long, unsigned long)'
/usr/include/secure/_string.h:115:3: note: expanded from macro 'strlcat'
                __builtin___strlcat_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                ^
2 warnings and 6 errors generated.
make[2]: *** [netcalc-netcalc.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
@troglobit
Copy link
Owner

Thanks for reporting this, gave me a chance to try out netcalc on macOS! Should work better now :)

Unless you find something else I'll start the release process for a v2.1.4

@luckman212
Copy link
Author

@troglobit Brilliant! That was it. I was able to compile and run. Thank you so much.

@troglobit
Copy link
Owner

@luckman212 Awesome! I'll roll out v2.1.4 tomorrow :)

@luckman212
Copy link
Author

Just another thank you - I downloaded 2.1.4 today and it compiled and runs fine on macOS with nothing more than the standard ./configure && make 🍻

@troglobit
Copy link
Owner

@luckman212 No problem mate, that's after all how it's supposed to work, glad I could help! 😃

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