happyfish100 / happyfish100/libserverframe
libserverframe make error
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 25
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
gcc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -fPIC -c -o sf_nio.lo sf_nio.c -Iinclude -I/usr/local/include
In file included from /usr/include/fastcommon/fast_mblock.h:26:0,
from /usr/include/fastcommon/connection_pool.h:26,
from sf_types.h:26,
from sf_global.h:25,
from sf_nio.c:41:
/usr/include/fastcommon/fc_memory.h: In function ‘fc_malloc_ex’:
/usr/include/fastcommon/fc_memory.h:39:52: error: expected ‘)’ before ‘PRId64’
logError("file: %s, line: %d, malloc %"PRId64" bytes fail, "
^
/usr/include/fastcommon/fc_memory.h: In function ‘fc_realloc_ex’:
/usr/include/fastcommon/fc_memory.h:56:53: error: expected ‘)’ before ‘PRId64’
logError("file: %s, line: %d, realloc %"PRId64" bytes fail, "
^
/usr/include/fastcommon/fc_memory.h: In function ‘fc_calloc_ex’:
/usr/include/fastcommon/fc_memory.h:92:52: error: expected ‘)’ before ‘PRId64’
logError("file: %s, line: %d, malloc %"PRId64" bytes fail, "
^
In file included from /usr/include/fastcommon/connection_pool.h:26:0,
from sf_types.h:26,
from sf_global.h:25,
from sf_nio.c:41:
/usr/include/fastcommon/fast_mblock.h: At top level:
/usr/include/fastcommon/fast_mblock.h:138:5: error: unknown type name ‘pthread_lock_cond_pair_t’
pthread_lock_cond_pair_t lcp; //for read / write free node chain
^
/usr/include/fastcommon/fast_mblock.h: In function ‘fast_mblock_set_need_wait’:
/usr/include/fastcommon/fast_mblock.h:248:64: error: expected ‘)’ before ‘PRId64’
"need_lock: %d != 1 or alloc_elements.limit: %"PRId64" <= 0",
^
/usr/include/fastcommon/fast_mblock.h:257:51: error: ‘LOG_NOTHING’ undeclared (first use in this function)
mblock->alloc_elements.exceed_log_level = LOG_NOTHING;
^
/usr/include/fastcommon/fast_mblock.h:257:51: note: each undeclared identifier is reported only once for each function it appears in
In file included from /usr/include/fastcommon/server_id_func.h:24:0,
from sf_types.h:28,
from sf_global.h:25,
from sf_nio.c:41:
/usr/include/fastcommon/fast_buffer.h: At top level:
/usr/include/fastcommon/fast_buffer.h💯1: error: unknown type name ‘string_t’
static inline int fast_buffer_append_string2(FastBuffer *buffer, const string_t *add)
^
/usr/include/fastcommon/fast_buffer.h: In function ‘fast_buffer_append_string2’:
/usr/include/fastcommon/fast_buffer.h:102:47: error: request for member ‘str’ in something not a structure or union
return fast_buffer_append_buff(buffer, add->str, add->len);
^
/usr/include/fastcommon/fast_buffer.h:102:57: error: request for member ‘len’ in something not a structure or union
return fast_buffer_append_buff(buffer, add->str, add->len);
^
In file included from sf_types.h:28:0,
from sf_global.h:25,
from sf_nio.c:41:
/usr/include/fastcommon/server_id_func.h: At top level:
/usr/include/fastcommon/server_id_func.h:57:5: error: unknown type name ‘string_t’
string_t group_name;
^
/usr/include/fastcommon/server_id_func.h:62:9: error: unknown type name ‘string_t’
string_t ip_prefix;
^
/usr/include/fastcommon/server_id_func.h:65:17: error: ‘FAST_INI_ITEM_NAME_SIZE’ undeclared here (not in a function)
char name_buff[FAST_INI_ITEM_NAME_SIZE]; //group_name string holder
^
/usr/include/fastcommon/server_id_func.h:89:5: error: unknown type name ‘string_t’
string_t ip_addr;
^
/usr/include/fastcommon/server_id_func.h:130:9: error: unknown type name ‘string_t’
const string_t *ip_addr, const int port);
^
/usr/include/fastcommon/server_id_func.h: In function ‘fc_server_get_by_ip_port’:
/usr/include/fastcommon/server_id_func.h:135:5: error: unknown type name ‘string_t’
string_t saddr;
^
/usr/include/fastcommon/server_id_func.h: At top level:
/usr/include/fastcommon/server_id_func.h:141:9: error: unknown type name ‘string_t’
const string_t *group_name);
^
/usr/include/fastcommon/server_id_func.h:144:9: error: unknown type name ‘string_t’
const string_t *group_name)
^
/usr/include/fastcommon/server_id_func.h: In function ‘fc_server_get_group_index’:
/usr/include/fastcommon/server_id_func.h:158:5: error: unknown type name ‘string_t’
string_t gname;
^
In file included from sf_global.h:25:0,
from sf_nio.c:41:
sf_types.h: At top level:
sf_types.h:210:5: error: unknown type name ‘key_value_pair_t’
key_value_pair_t *elts;
^
sf_types.h:216:5: error: unknown type name ‘string_t’
string_t name;
^
sf_types.h:245:5: error: unknown type name ‘pthread_lock_cond_pair_t’
pthread_lock_cond_pair_t lcp;
^
In file included from sf_nio.c:41:0:
sf_global.h:60:5: error: unknown type name ‘string_t’
string_t empty;
^
sf_global.h:65:5: error: unknown type name ‘IniFullContext’
IniFullContext ini_ctx;
^
sf_global.h:171:9: error: unknown type name ‘IniFullContext’
IniFullContext *ini_ctx, const bool load_network_params,
^
sf_global.h:176:9: error: unknown type name ‘IniFullContext’
IniFullContext *ini_ctx)
^
sf_global.h: In function ‘sf_load_config’:
sf_global.h:198:5: warning: implicit declaration of function ‘FAST_INI_SET_FULL_CTX_EX’ [-Wimplicit-function-declaration]
SF_SET_CONTEXT_INI_CONFIG(config, filename, pIniContext,
^
sf_global.h: At top level:
sf_global.h:221:24: error: unknown type name ‘IniFullContext’
int sf_load_log_config(IniFullContext *ini_ctx, LogContext *log_ctx,
^
sf_global.h:224:32: error: unknown type name ‘IniFullContext’
int sf_load_slow_log_config_ex(IniFullContext *ini_ctx, LogContext *log_ctx,
^
sf_global.h: In function ‘sf_load_slow_log_config’:
sf_global.h:231:5: error: unknown type name ‘IniFullContext’
IniFullContext ini_ctx;
^
sf_global.h:234:5: warning: implicit declaration of function ‘sf_load_slow_log_config_ex’ [-Wimplicit-function-declaration]
return sf_load_slow_log_config_ex(&ini_ctx, log_ctx, slow_log_cfg);
^
sf_global.h: At top level:
sf_global.h:265:30: error: unknown type name ‘IniFullContext’
int sf_load_global_base_path(IniFullContext *ini_ctx);
^
sf_global.h:267:33: error: unknown type name ‘IniFullContext’
int sf_load_data_path_config_ex(IniFullContext *ini_ctx,
^
sf_global.h:268:59: error: unknown type name ‘string_t’
const char *item_name, const char *default_value, string_t *path);
^
sf_global.h: In function ‘sf_set_global_base_path’:
sf_global.h:275:5: error: unknown type name ‘string_t’
string_t path_string;
^
sf_global.h:278:5: warning: implicit declaration of function ‘normalize_path’ [-Wimplicit-function-declaration]
normalize_path(NULL, &path_string, SF_G_BASE_PATH_STR,
^
sf_nio.c: In function ‘sf_connect_server’:
sf_nio.c:232:5: warning: implicit declaration of function ‘socketCreateEx2’ [-Wimplicit-function-declaration]
if ((task->event.fd=socketCreateEx2(AF_UNSPEC, task->server_ip,
^
sf_nio.c:238:5: warning: implicit declaration of function ‘asyncconnectserverbyip’ [-Wimplicit-function-declaration]
result = asyncconnectserverbyip(task->event.fd,
^
sf_nio.c: In function ‘sf_nio_notify’:
sf_nio.c:366:5: warning: implicit declaration of function ‘PTHREAD_MUTEX_LOCK’ [-Wimplicit-function-declaration]
PTHREAD_MUTEX_LOCK(&task->thread_data->waiting_queue.lock);
^
sf_nio.c:376:5: warning: implicit declaration of function ‘PTHREAD_MUTEX_UNLOCK’ [-Wimplicit-function-declaration]
PTHREAD_MUTEX_UNLOCK(&task->thread_data->waiting_queue.lock);
^
sf_nio.c: In function ‘check_task’:
sf_nio.c:487:5: warning: implicit declaration of function ‘tcp_socket_connected’ [-Wimplicit-function-declaration]
if (tcp_socket_connected(task->event.fd)) {
^
sf_nio.c: In function ‘sf_client_sock_read’:
sf_nio.c:522:41: error: ‘g_current_time’ undeclared (first use in this function)
task->event.timer.expires = g_current_time +
^
sf_nio.c:535:54: error: expected ‘)’ before ‘PRId64’
"client ip: %s, req_count: %"PRId64", recv timeout",
^
sf_nio.c:608:9: warning: implicit declaration of function ‘TCP_SET_QUICK_ACK’ [-Wimplicit-function-declaration]
TCP_SET_QUICK_ACK(sock);
^
sf_nio.c: In function ‘sf_client_sock_write’:
sf_nio.c:727:33: error: ‘g_current_time’ undeclared (first use in this function)
&task->event.timer, g_current_time +
^
sf_nio.c:732:21: warning: implicit declaration of function ‘FC_MIN’ [-Wimplicit-function-declaration]
FC_MIN(task->iovec_array.count, IOV_MAX));
^
sf_nio.c:732:53: error: ‘IOV_MAX’ undeclared (first use in this function)
FC_MIN(task->iovec_array.count, IOV_MAX));
^
make: *** [sf_nio.lo] Error 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported make compilation command for sf_nio.c and review the include chain through sf_types.h, sf_global.h, and the /usr/include/fastcommon headers. Compare the missing types, macros, and declarations with the project’s expected dependencies; done means the libserverframe build completes without these compiler errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100