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

ubuntu 14.04 install error #6

Open
lambdaoo opened this issue Dec 12, 2017 · 1 comment
Open

ubuntu 14.04 install error #6

lambdaoo opened this issue Dec 12, 2017 · 1 comment

Comments

@lambdaoo
Copy link

lambdaoo commented Dec 12, 2017

/usr/src/MyFlash# pkg-config --cflags --libs glib-2.0
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lglib-2.0

/usr/src/MyFlash# gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

/usr/src/MyFlash# bash build.sh
/tmp/cc2yjKH9.o: In function checkPotentialConflictOutputFile': /usr/src/MyFlash/source/binlogParseGlib.c:305: undefined reference to g_log'
/usr/src/MyFlash/source/binlogParseGlib.c:315: undefined reference to g_log' /tmp/cc2yjKH9.o: In function constructFileNameWithPostfixIndex':
/usr/src/MyFlash/source/binlogParseGlib.c:330: undefined reference to g_strdup_printf' /usr/src/MyFlash/source/binlogParseGlib.c:333: undefined reference to g_strdup_printf'
/tmp/cc2yjKH9.o: In function rotateFile': /usr/src/MyFlash/source/binlogParseGlib.c:347: undefined reference to g_log'
/tmp/cc2yjKH9.o: In function rotateOutputBinlogFileNames': /usr/src/MyFlash/source/binlogParseGlib.c:354: undefined reference to g_strdup_printf'
/tmp/cc2yjKH9.o: In function packUuidInto16Bytes': /usr/src/MyFlash/source/binlogParseGlib.c:397: undefined reference to g_malloc0_n'
/usr/src/MyFlash/source/binlogParseGlib.c:411: undefined reference to g_ascii_tolower' /usr/src/MyFlash/source/binlogParseGlib.c:411: undefined reference to g_ascii_tolower'
/usr/src/MyFlash/source/binlogParseGlib.c:412: undefined reference to g_ascii_tolower' /tmp/cc2yjKH9.o: In function isDatabaseShouldApply':
/usr/src/MyFlash/source/binlogParseGlib.c:432: undefined reference to g_strsplit' /usr/src/MyFlash/source/binlogParseGlib.c:435: undefined reference to g_ascii_strcasecmp'
/tmp/cc2yjKH9.o: In function isTableShouldApply': /usr/src/MyFlash/source/binlogParseGlib.c:448: undefined reference to g_strsplit'
/usr/src/MyFlash/source/binlogParseGlib.c:451: undefined reference to g_ascii_strcasecmp' /tmp/cc2yjKH9.o: In function isEventTypeShouldApply':
/usr/src/MyFlash/source/binlogParseGlib.c:466: undefined reference to g_strsplit' /usr/src/MyFlash/source/binlogParseGlib.c:469: undefined reference to g_ascii_strcasecmp'
/usr/src/MyFlash/source/binlogParseGlib.c:471: undefined reference to g_ascii_strcasecmp' /usr/src/MyFlash/source/binlogParseGlib.c:473: undefined reference to g_ascii_strcasecmp'
/tmp/cc2yjKH9.o: In function getIoChannelForWrite': /usr/src/MyFlash/source/binlogParseGlib.c:585: undefined reference to g_io_channel_new_file'
/usr/src/MyFlash/source/binlogParseGlib.c:587: undefined reference to g_log' /usr/src/MyFlash/source/binlogParseGlib.c:591: undefined reference to g_io_channel_set_encoding'
/usr/src/MyFlash/source/binlogParseGlib.c:593: undefined reference to g_log' /tmp/cc2yjKH9.o: In function printHex':
/usr/src/MyFlash/source/binlogParseGlib.c:687: undefined reference to g_log' /usr/src/MyFlash/source/binlogParseGlib.c:689: undefined reference to g_log'
/tmp/cc2yjKH9.o: In function printEventInHex': /usr/src/MyFlash/source/binlogParseGlib.c:697: undefined reference to g_log'
/usr/src/MyFlash/source/binlogParseGlib.c:699: undefined reference to g_log' /tmp/cc2yjKH9.o:/usr/src/MyFlash/source/binlogParseGlib.c:745: more undefined references to g_log' follow
/tmp/cc2yjKH9.o: In function isTransactionBeginText': /usr/src/MyFlash/source/binlogParseGlib.c:802: undefined reference to g_ascii_strcasecmp'
/tmp/cc2yjKH9.o: In function initTableMapEvent': /usr/src/MyFlash/source/binlogParseGlib.c:1465: undefined reference to g_byte_array_new'
/tmp/cc2yjKH9.o: In function parseQueryLogEvent': /usr/src/MyFlash/source/binlogParseGlib.c:1503: undefined reference to g_malloc0_n'
/usr/src/MyFlash/source/binlogParseGlib.c:1507: undefined reference to g_malloc0_n' /usr/src/MyFlash/source/binlogParseGlib.c:1516: undefined reference to g_malloc0_n'
/tmp/cc2yjKH9.o: In function parseGtidEvent': /usr/src/MyFlash/source/binlogParseGlib.c:1535: undefined reference to g_malloc0_n'
/tmp/cc2yjKH9.o: In function parseTableMapEventData': /usr/src/MyFlash/source/binlogParseGlib.c:1564: undefined reference to g_malloc0_n'
/tmp/cc2yjKH9.o:/usr/src/MyFlash/source/binlogParseGlib.c:1573: more undefined references to g_malloc0_n' follow /tmp/cc2yjKH9.o: In function parseTableMapEventData':
/usr/src/MyFlash/source/binlogParseGlib.c:1586: undefined reference to g_byte_array_append' /tmp/cc2yjKH9.o: In function appendToAllEventList':
/usr/src/MyFlash/source/binlogParseGlib.c:1628: undefined reference to g_malloc0_n' /usr/src/MyFlash/source/binlogParseGlib.c:1631: undefined reference to g_list_prepend'
/tmp/cc2yjKH9.o: In function deepCopyEventHeader': /usr/src/MyFlash/source/binlogParseGlib.c:1647: undefined reference to g_malloc0_n'
/usr/src/MyFlash/source/binlogParseGlib.c:1656: undefined reference to g_malloc0_n' /tmp/cc2yjKH9.o: In function deepCopyEventWrapper':
/usr/src/MyFlash/source/binlogParseGlib.c:1666: undefined reference to g_malloc0_n' /usr/src/MyFlash/source/binlogParseGlib.c:1672: undefined reference to g_malloc0_n'
/usr/src/MyFlash/source/binlogParseGlib.c:1677: undefined reference to g_malloc0_n' /tmp/cc2yjKH9.o:/usr/src/MyFlash/source/binlogParseGlib.c:1686: more undefined references to g_malloc0_n' follow
/tmp/cc2yjKH9.o: In function deepCopyEventWrapper': /usr/src/MyFlash/source/binlogParseGlib.c:1715: undefined reference to g_byte_array_new'
/usr/src/MyFlash/source/binlogParseGlib.c:1718: undefined reference to g_byte_array_append' /usr/src/MyFlash/source/binlogParseGlib.c:1749: undefined reference to g_malloc0_n'
/usr/src/MyFlash/source/binlogParseGlib.c:1754: undefined reference to g_malloc0_n' /usr/src/MyFlash/source/binlogParseGlib.c:1763: undefined reference to g_malloc0_n'
/usr/src/MyFlash/source/binlogParseGlib.c:1769: undefined reference to g_malloc0_n' /usr/src/MyFlash/source/binlogParseGlib.c:1774: undefined reference to g_malloc0_n'
/tmp/cc2yjKH9.o:/usr/src/MyFlash/source/binlogParseGlib.c:1779: more undefined references to g_malloc0_n' follow /tmp/cc2yjKH9.o: In function isLeastExecutionUnitShouldKeep':
/usr/src/MyFlash/source/binlogParseGlib.c:1822: undefined reference to g_log' /tmp/cc2yjKH9.o: In function constructLeastExecutionUnitFromAllEventsList':
/usr/src/MyFlash/source/binlogParseGlib.c:1854: undefined reference to g_malloc0_n' /usr/src/MyFlash/source/binlogParseGlib.c:1856: undefined reference to g_log'
/usr/src/MyFlash/source/binlogParseGlib.c:1859: undefined reference to g_list_append' /usr/src/MyFlash/source/binlogParseGlib.c:1861: undefined reference to g_log'
/usr/src/MyFlash/source/binlogParseGlib.c:1869: undefined reference to g_list_append' /usr/src/MyFlash/source/binlogParseGlib.c:1873: undefined reference to g_log'
/usr/src/MyFlash/source/binlogParseGlib.c:1881: undefined reference to g_list_length' /usr/src/MyFlash/source/binlogParseGlib.c:1881: undefined reference to g_log'
/tmp/cc2yjKH9.o: In function exchangeBeforeRowImageWithAfterRowImage': /usr/src/MyFlash/source/binlogParseGlib.c:1889: undefined reference to g_malloc0_n'
/tmp/cc2yjKH9.o: In function reverseLeastExecutionUnitEventsForUpdateRowEvent': /usr/src/MyFlash/source/binlogParseGlib.c:1932: undefined reference to g_malloc0_n'
/usr/src/MyFlash/source/binlogParseGlib.c:1936: undefined reference to g_malloc0_n' /usr/src/MyFlash/source/binlogParseGlib.c:1960: undefined reference to g_malloc0_n'
/usr/src/MyFlash/source/binlogParseGlib.c:1972: undefined reference to g_log' /usr/src/MyFlash/source/binlogParseGlib.c:1988: undefined reference to g_log'
/tmp/cc2yjKH9.o: In function reverseLeastExecutionUnitEventsForWriteOrDeleteRowEvent': /usr/src/MyFlash/source/binlogParseGlib.c:2006: undefined reference to g_log'
/tmp/cc2yjKH9.o: In function appendFormatDescriptionEventToChannel': /usr/src/MyFlash/source/binlogParseGlib.c:2050: undefined reference to g_log'
/usr/src/MyFlash/source/binlogParseGlib.c:2055: undefined reference to g_io_channel_write_chars' /usr/src/MyFlash/source/binlogParseGlib.c:2057: undefined reference to g_log'
/usr/src/MyFlash/source/binlogParseGlib.c:2061: undefined reference to g_io_channel_write_chars' /usr/src/MyFlash/source/binlogParseGlib.c:2063: undefined reference to g_log'
/tmp/cc2yjKH9.o: In function constructBinlogFromEventListWithSizeLimit': /usr/src/MyFlash/source/binlogParseGlib.c:2075: undefined reference to g_io_channel_write_chars'
/usr/src/MyFlash/source/binlogParseGlib.c:2077: undefined reference to g_log' /usr/src/MyFlash/source/binlogParseGlib.c:2092: undefined reference to g_io_channel_write_chars'
/usr/src/MyFlash/source/binlogParseGlib.c:2094: undefined reference to g_log' /usr/src/MyFlash/source/binlogParseGlib.c:2097: undefined reference to g_io_channel_write_chars'
/usr/src/MyFlash/source/binlogParseGlib.c:2099: undefined reference to g_log' /usr/src/MyFlash/source/binlogParseGlib.c:2111: undefined reference to g_io_channel_flush'
/usr/src/MyFlash/source/binlogParseGlib.c:2113: undefined reference to g_log' /tmp/cc2yjKH9.o: In function splitBigRowEventsToTableMapWithRowEventForEventList':
/usr/src/MyFlash/source/binlogParseGlib.c:2126: undefined reference to g_log' /usr/src/MyFlash/source/binlogParseGlib.c:2136: undefined reference to g_list_prepend'
/usr/src/MyFlash/source/binlogParseGlib.c:2137: undefined reference to g_log' /usr/src/MyFlash/source/binlogParseGlib.c:2139: undefined reference to g_list_prepend'
/usr/src/MyFlash/source/binlogParseGlib.c:2147: undefined reference to g_list_reverse' /tmp/cc2yjKH9.o: In function constructBinlogFromLeastExecutionUintList':
/usr/src/MyFlash/source/binlogParseGlib.c:2173: undefined reference to g_strdup_printf' /usr/src/MyFlash/source/binlogParseGlib.c:2179: undefined reference to g_io_channel_write_chars'
/usr/src/MyFlash/source/binlogParseGlib.c:2181: undefined reference to g_log' /usr/src/MyFlash/source/binlogParseGlib.c:2195: undefined reference to g_io_channel_write_chars'
/usr/src/MyFlash/source/binlogParseGlib.c:2197: undefined reference to g_log' /usr/src/MyFlash/source/binlogParseGlib.c:2200: undefined reference to g_io_channel_write_chars'
/usr/src/MyFlash/source/binlogParseGlib.c:2202: undefined reference to g_log' /usr/src/MyFlash/source/binlogParseGlib.c:2215: undefined reference to g_io_channel_write_chars'
/usr/src/MyFlash/source/binlogParseGlib.c:2217: undefined reference to g_log' /usr/src/MyFlash/source/binlogParseGlib.c:2221: undefined reference to g_io_channel_write_chars'
/usr/src/MyFlash/source/binlogParseGlib.c:2223: undefined reference to g_log' /usr/src/MyFlash/source/binlogParseGlib.c:2231: undefined reference to g_io_channel_flush'
/tmp/cc2yjKH9.o: In function flashbackAllEvents': /usr/src/MyFlash/source/binlogParseGlib.c:2244: undefined reference to g_list_prepend'
/usr/src/MyFlash/source/binlogParseGlib.c:2248: undefined reference to g_list_reverse' /usr/src/MyFlash/source/binlogParseGlib.c:2252: undefined reference to g_list_length'
/usr/src/MyFlash/source/binlogParseGlib.c:2252: undefined reference to g_log' /usr/src/MyFlash/source/binlogParseGlib.c:2263: undefined reference to g_list_reverse'
/tmp/cc2yjKH9.o: In function processBinlog': /usr/src/MyFlash/source/binlogParseGlib.c:2279: undefined reference to g_io_channel_seek_position'
/usr/src/MyFlash/source/binlogParseGlib.c:2281: undefined reference to g_log' /usr/src/MyFlash/source/binlogParseGlib.c:2291: undefined reference to g_malloc0_n'
/usr/src/MyFlash/source/binlogParseGlib.c:2294: undefined reference to g_io_channel_seek_position' /usr/src/MyFlash/source/binlogParseGlib.c:2295: undefined reference to g_log'
/usr/src/MyFlash/source/binlogParseGlib.c:2298: undefined reference to g_malloc0_n' /usr/src/MyFlash/source/binlogParseGlib.c:2301: undefined reference to g_io_channel_read_chars'
/usr/src/MyFlash/source/binlogParseGlib.c:2302: undefined reference to g_log' /usr/src/MyFlash/source/binlogParseGlib.c:2305: undefined reference to g_malloc0_n'
/usr/src/MyFlash/source/binlogParseGlib.c:2313: undefined reference to g_malloc0_n' /usr/src/MyFlash/source/binlogParseGlib.c:2316: undefined reference to g_log'
/usr/src/MyFlash/source/binlogParseGlib.c:2323: undefined reference to g_malloc0_n' /usr/src/MyFlash/source/binlogParseGlib.c:2330: undefined reference to g_malloc0_n'
/usr/src/MyFlash/source/binlogParseGlib.c:2338: undefined reference to g_malloc0_n' /usr/src/MyFlash/source/binlogParseGlib.c:2344: undefined reference to g_malloc0_n'
/usr/src/MyFlash/source/binlogParseGlib.c:2361: undefined reference to g_log' /usr/src/MyFlash/source/binlogParseGlib.c:2368: undefined reference to g_log'
/usr/src/MyFlash/source/binlogParseGlib.c:2371: undefined reference to g_log' /usr/src/MyFlash/source/binlogParseGlib.c:2373: undefined reference to g_list_delete_link'
/usr/src/MyFlash/source/binlogParseGlib.c:2377: undefined reference to g_log' /usr/src/MyFlash/source/binlogParseGlib.c:2379: undefined reference to g_list_delete_link'
/usr/src/MyFlash/source/binlogParseGlib.c:2382: undefined reference to g_io_channel_seek_position' /usr/src/MyFlash/source/binlogParseGlib.c:2383: undefined reference to g_log'
/usr/src/MyFlash/source/binlogParseGlib.c:2289: undefined reference to g_io_channel_read_chars' /usr/src/MyFlash/source/binlogParseGlib.c:2392: undefined reference to g_list_length'
/usr/src/MyFlash/source/binlogParseGlib.c:2392: undefined reference to g_log' /usr/src/MyFlash/source/binlogParseGlib.c:2394: undefined reference to g_list_reverse'
/usr/src/MyFlash/source/binlogParseGlib.c:2397: undefined reference to g_log' /tmp/cc2yjKH9.o: In function parsemultipleGtidSetToGtidSetInfoArray':
/usr/src/MyFlash/source/binlogParseGlib.c:2428: undefined reference to g_array_new' /usr/src/MyFlash/source/binlogParseGlib.c:2431: undefined reference to g_strsplit'
/usr/src/MyFlash/source/binlogParseGlib.c:2437: undefined reference to g_malloc0_n' /usr/src/MyFlash/source/binlogParseGlib.c:2438: undefined reference to g_strsplit'
/usr/src/MyFlash/source/binlogParseGlib.c:2440: undefined reference to g_strsplit' /usr/src/MyFlash/source/binlogParseGlib.c:2443: undefined reference to g_strv_length'
/usr/src/MyFlash/source/binlogParseGlib.c:2453: undefined reference to g_array_append_vals' /tmp/cc2yjKH9.o: In function parseOption':
/usr/src/MyFlash/source/binlogParseGlib.c:2482: undefined reference to g_option_context_new' /usr/src/MyFlash/source/binlogParseGlib.c:2483: undefined reference to g_option_context_add_main_entries'
/usr/src/MyFlash/source/binlogParseGlib.c:2484: undefined reference to g_option_context_parse' /usr/src/MyFlash/source/binlogParseGlib.c:2486: undefined reference to g_log'
/usr/src/MyFlash/source/binlogParseGlib.c:2492: undefined reference to g_malloc0_n' /usr/src/MyFlash/source/binlogParseGlib.c:2501: undefined reference to g_malloc0_n'
/usr/src/MyFlash/source/binlogParseGlib.c:2513: undefined reference to g_log' /usr/src/MyFlash/source/binlogParseGlib.c:2523: undefined reference to g_log'
/tmp/cc2yjKH9.o: In function setLogHandler': /usr/src/MyFlash/source/binlogParseGlib.c:2548: undefined reference to g_log_set_handler'
/usr/src/MyFlash/source/binlogParseGlib.c:2549: undefined reference to g_ascii_strcasecmp' /usr/src/MyFlash/source/binlogParseGlib.c:2550: undefined reference to g_log_default_handler'
/usr/src/MyFlash/source/binlogParseGlib.c:2550: undefined reference to g_log_set_handler' /usr/src/MyFlash/source/binlogParseGlib.c:2551: undefined reference to g_ascii_strcasecmp'
/usr/src/MyFlash/source/binlogParseGlib.c:2552: undefined reference to g_log_default_handler' /usr/src/MyFlash/source/binlogParseGlib.c:2552: undefined reference to g_log_set_handler'
/usr/src/MyFlash/source/binlogParseGlib.c:2554: undefined reference to g_log_default_handler' /usr/src/MyFlash/source/binlogParseGlib.c:2554: undefined reference to g_log_set_handler'
/tmp/cc2yjKH9.o: In function main': /usr/src/MyFlash/source/binlogParseGlib.c:2568: undefined reference to g_log'
/usr/src/MyFlash/source/binlogParseGlib.c:2571: undefined reference to g_strsplit' /usr/src/MyFlash/source/binlogParseGlib.c:2583: undefined reference to g_log'
/usr/src/MyFlash/source/binlogParseGlib.c:2590: undefined reference to g_io_channel_new_file' /usr/src/MyFlash/source/binlogParseGlib.c:2592: undefined reference to g_log'
/usr/src/MyFlash/source/binlogParseGlib.c:2595: undefined reference to g_io_channel_set_encoding' /usr/src/MyFlash/source/binlogParseGlib.c:2597: undefined reference to g_log'
collect2: error: ld returned 1 exit status
调整编译参数循序后,就可以了,什么原因?
gcc source/binlogParseGlib.c -o binary/flashback -w pkg-config --cflags --libs glib-2.0
/usr/src/MyFlash# binary/flashback --help
Usage:
flashback [OPTION...]

Help Options:
-h, --help Show help options

Application Options:
--databaseNames databaseName to apply. if multiple, seperate by comma(,)
--tableNames tableName to apply. if multiple, seperate by comma(,)
--start-position start position
--stop-position stop position
--start-datetime start time (format %Y-%m-%d %H:%M:%S)
--stop-datetime stop time (format %Y-%m-%d %H:%M:%S)
--sqlTypes sql type to filter . support INSERT, UPDATE ,DELETE. if multiple, seperate by comma(,)
--maxSplitSize max file size after split, the uint is M
--binlogFileNames binlog files to process. if multiple, seperate by comma(,)
--outBinlogFileNameBase output binlog file name base
--logLevel log level, available option is debug,warning,error
--include-gtids gtids to process
--exclude-gtids gtids to skip

@GaryMeng
Copy link

GaryMeng commented Mar 1, 2018

Ubuntu下:
gcc -w source/binlogParseGlib.c -o binary/flashback pkg-config --cflags --libs glib-2.0

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