updateing / minieap

可扩展的 802.1x 客户端,带有锐捷 v3 (v4) 算法插件支持
GNU General Public License v3.0
514 stars 93 forks source link

Compile issues #31

Closed SidekickLx closed 6 years ago

SidekickLx commented 6 years ago

Error occurs while compiling Minieap on O2 and O3 level

cc  -Iutil/ -Iinclude -O3  -Wall -Wpedantic -D_GNU_SOURCE  util/pid_lock.c -c -o util/pid_lock.o
In file included from /usr/include/fcntl.h:289:0,
                 from /usr/include/x86_64-linux-gnu/sys/file.h:24,
                 from util/pid_lock.c:1:
In function ‘open’,
    inlined from ‘pid_lock_init’ at util/pid_lock.c:29:19:
/usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:4: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments
    __open_missing_mode ();
    ^
/home/ericlee/minieap/append.mk:22: recipe for target 'util/pid_lock.o' failed
make: *** [util/pid_lock.o] Error 1

Here are some info gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9) Target: x86_64-linux-gnu

#### Choose/Add your modules here ####
PLUGIN_MODULES := \       
 packet_plugin_printer \        
packet_plugin_rjv3
# Linux
PLUGIN_MODULES += if_impl_sockraw
# macOS / BSD
# PLUGIN_MODULES += if_impl_bpf

# Other OS
# PLUGIN_MODULES += if_impl_libpcap

# This implementation is not included in the code.
# If you need it, add it yourselves.
# PLUGIN_MODULES += ifaddrs

ENABLE_DEBUG  := false
ENABLE_ICONV  := false
ENABLE_GBCONV := false
STATIC_BUILD  := false
# If your platform has iconv_* integrated into libc, change to false
# Affects dynamic linking
LIBICONV_STANDALONE := false
CUSTOM_CFLAGS := -O3
CUSTOM_LDFLAGS :=
CUSTOM_LIBS :=

# Example for cross-compiling
# CC := arm-brcm-linux-uclibcgnueabi-gcc
# ENABLE_ICONV := true

And checkout this and this, hope it would help :)

Good day

Z-Y00 commented 6 years ago

why not launch a pull request, for there seems only a small tweak needed )


From: SidekickLx notifications@github.com Sent: Thursday, August 9, 2018 7:17 AM To: updateing/minieap Cc: Subscribed Subject: [updateing/minieap] Compile issues (#31)

Error occurs while compiling Minieap on O2 and O3 level

cc -Iutil/ -Iinclude -O3 -Wall -Wpedantic -D_GNU_SOURCE util/pid_lock.c -c -o util/pid_lock.oIn file included from /usr/include/fcntl.h:289:0, from /usr/include/x86_64-linux-gnu/sys/file.h:24, from util/pid_lock.c:1:In function ‘open’, inlined from ‘pid_lock_init’ at util/pid_lock.c:29:19:/usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:4: error: call to ‘open_missing_mode’ declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments open_missing_mode (); ^/home/ericlee/minieap/append.mk:22: recipe for target 'util/pid_lock.o' failedmake: *** [util/pid_lock.o] Error 1

Here are some info gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9) Target: x86_64-linux-gnu

Choose/Add your modules here ####PLUGIN_MODULES := \ packet_plugin_printer \ packet_plugin_rjv3# LinuxPLUGIN_MODULES += if_impl_sockraw# macOS / BSD# PLUGIN_MODULES += if_impl_bpf# Other OS# PLUGIN_MODULES += if_impl_libpcap# This implementation is not included in the code.# If you need it, add it yourselves.# PLUGIN_MODULES += ifaddrsENABLE_DEBUG := falseENABLE_ICONV := falseENABLE_GBCONV := falseSTATICBUILD := false# If your platform has iconv* integrated into libc, change to false# Affects dynamic linkingLIBICONV_STANDALONE := falseCUSTOM_CFLAGS := -O3CUSTOM_LDFLAGS :=CUSTOM_LIBS :=# Example for cross-compiling# CC := arm-brcm-linux-uclibcgnueabi-gcc# ENABLE_ICONV := true

And checkout thishttps://github.com/pantheon-systems/fusedav/issues/204 and thishttps://stackoverflow.com/questions/25706291/error-in-using-open-in-cuda-c, hope it would help :)

Good day

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/updateing/minieap/issues/31, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AWnmJkEQaixBVjt2ykWfiTcx-IxeMawhks5uO3GLgaJpZM4V0z0C.

SidekickLx commented 6 years ago

Actually I use this project for some binary researches. Thus I never played with this project before, and I am not sure about the third argument of that open() function. When I tried to build, the issue just occurred. So I just raised the issue and continued working 😓. I think it should be pid_lock_fd = open(pidfile, O_RDWR | O_CREAT, 0644); let me send a request. Thanks so much.

櫻川 Y00 notifications@github.com 于2018年8月8日周三 下午5:38写道:

why not launch a pull request, for there seems only a small tweak needed )


From: SidekickLx notifications@github.com Sent: Thursday, August 9, 2018 7:17 AM To: updateing/minieap Cc: Subscribed Subject: [updateing/minieap] Compile issues (#31)

Error occurs while compiling Minieap on O2 and O3 level

cc -Iutil/ -Iinclude -O3 -Wall -Wpedantic -D_GNU_SOURCE util/pid_lock.c -c -o util/pid_lock.oIn file included from /usr/include/fcntl.h:289:0, from /usr/include/x86_64-linux-gnu/sys/file.h:24, from util/pid_lock.c:1:In function ‘open’, inlined from ‘pid_lock_init’ at util/pid_lock.c:29:19:/usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:4: error: call to ‘open_missing_mode’ declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments open_missing_mode (); ^/home/ericlee/minieap/append.mk:22: recipe for target 'util/pid_lock.o' failedmake: *** [util/pid_lock.o] Error 1

Here are some info gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9) Target: x86_64-linux-gnu

Choose/Add your modules here ####PLUGIN_MODULES := \

packet_plugin_printer \ packet_plugin_rjv3# LinuxPLUGIN_MODULES += if_impl_sockraw# macOS / BSD# PLUGIN_MODULES += if_impl_bpf# Other OS# PLUGIN_MODULES += if_impl_libpcap# This implementation is not included in the code.# If you need it, add it yourselves.# PLUGIN_MODULES += ifaddrsENABLE_DEBUG := falseENABLE_ICONV := falseENABLE_GBCONV := falseSTATICBUILD := false# If your platform has iconv* integrated into libc, change to false# Affects dynamic linkingLIBICONV_STANDALONE := falseCUSTOM_CFLAGS := -O3CUSTOM_LDFLAGS :=CUSTOM_LIBS :=# Example for cross-compiling# CC := arm-brcm-linux-uclibcgnueabi-gcc# ENABLE_ICONV := true

And checkout thishttps://github.com/pantheon-systems/fusedav/issues/204 and this< https://stackoverflow.com/questions/25706291/error-in-using-open-in-cuda-c>, hope it would help :)

Good day

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub< https://github.com/updateing/minieap/issues/31>, or mute the thread< https://github.com/notifications/unsubscribe-auth/AWnmJkEQaixBVjt2ykWfiTcx-IxeMawhks5uO3GLgaJpZM4V0z0C

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/updateing/minieap/issues/31#issuecomment-411599410, or mute the thread https://github.com/notifications/unsubscribe-auth/AM136TpGpf69Po1fJZm7BFuWH-g46Zmmks5uO4SYgaJpZM4V0z0C .