Tibor Kiss created STORM-2351:
---------------------------------
Summary: Unable to build native code on OS X
Key: STORM-2351
URL: https://issues.apache.org/jira/browse/STORM-2351
Project: Apache Storm
Issue Type: Bug
Components: storm-core
Affects Versions: 1.0.0, 2.0.0, 0.10.3
Reporter: Tibor Kiss
Assignee: Tibor Kiss
Priority: Minor
Compilation of Storm fails under OS X if native profile is enabled for multiple
reasons:
1)
{code}
~/w/storm ❯❯❯ mvn clean install -Pnative -DskipTests
....
....
[INFO] --- exec-maven-plugin:1.2.1:exec (default) @ storm-core ---
cp: illegal option -- u
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ...
target_directory
{code}
The problem is caused by the lack of "u" (upgrade) flag of cp.
2)
{code}
[INFO] gcc -DPACKAGE_NAME=\"worker-launcher\"
-DPACKAGE_TARNAME=\"worker-launcher\" -DPACKAGE_VERSION=\"1.0.0\"
-DPACKAGE_STRING=\"worker-launcher\ 1.0.0\"
-DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"\"
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -D__EXTENSIONS__=1 -D_ALL_SOURCE=1
-D_GNU_SOURCE=1 -D_POSIX_PTHREAD_SEMANTICS=1 -D_TANDEM_SOURCE=1
-DPACKAGE=\"worker-launcher\" -DVERSION=\"1.0.0\" -DHAVE_UNISTD_H=1
-DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_DECL_STRERROR_R=1 -DHAVE_STRERROR_R=1
-DHAVE_MKDIR=1 -DHAVE_UNAME=1 -I. -I./impl -Wall -g -Werror
-DEXEC_CONF_DIR=/etc/storm -MT impl/worker-launcher.o -MD -MP -MF $depbase.Tpo
-c -o impl/worker-launcher.o impl/worker-launcher.c &&\
[INFO] mv -f $depbase.Tpo $depbase.Po
[INFO] impl/worker-launcher.c:60:15: error: use of undeclared identifier
'PATH_MAX'
[INFO] char buffer[PATH_MAX];
[INFO] ^
[INFO] impl/worker-launcher.c:61:20: error: use of undeclared identifier
'PATH_MAX'
[INFO] snprintf(buffer, PATH_MAX, "/proc/%u/exe", getpid());
[INFO] ^
[INFO] impl/worker-launcher.c:62:27: error: use of undeclared identifier
'PATH_MAX'
[INFO] char *filename = malloc(PATH_MAX);
[INFO] ^
[INFO] impl/worker-launcher.c:67:44: error: use of undeclared identifier
'PATH_MAX'
[INFO] ssize_t len = readlink(buffer, filename, PATH_MAX);
[INFO] ^
[INFO] impl/worker-launcher.c:72:21: error: use of undeclared identifier
'PATH_MAX'
[INFO] } else if (len >= PATH_MAX) {
[INFO] ^
[INFO] impl/worker-launcher.c:74:13: error: use of undeclared identifier
'PATH_MAX'
[INFO] PATH_MAX, filename, PATH_MAX);
[INFO] ^
[INFO] impl/worker-launcher.c:74:33: error: use of undeclared identifier
'PATH_MAX'
[INFO] PATH_MAX, filename, PATH_MAX);
[INFO] ^
[INFO] impl/worker-launcher.c:99:9: error: unused variable 'binary_euid'
[-Werror,-Wunused-variable]
[INFO] uid_t binary_euid = filestat.st_uid; // Binary's user owner
[INFO] ^
[INFO] impl/worker-launcher.c:450:42: error: use of undeclared identifier
'PATH_MAX'
[INFO] char *(paths[]) = {strndup(local_dir,PATH_MAX), 0};
[INFO] ^
[INFO] impl/worker-launcher.c:597:42: error: use of undeclared identifier
'PATH_MAX'
[INFO] char *(paths[]) = {strndup(full_path,PATH_MAX), 0};
[INFO] ^
[INFO] impl/worker-launcher.c:725:3: error: implicit declaration of function
'fcloseall' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
[INFO] fcloseall();
[INFO] ^
[INFO] impl/worker-launcher.c:725:3: note: did you mean 'fclose'?
[INFO] /usr/include/stdio.h:232:6: note: 'fclose' declared here
[INFO] int fclose(FILE *);
[INFO] ^
[INFO] 11 errors generated.
[INFO] make: *** [impl/worker-launcher.o] Error 1
{code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)