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

make mingw fails with undefined reference to _strnlen #4

Closed
richard-lyman opened this issue Feb 1, 2015 · 8 comments · Fixed by #5
Closed

make mingw fails with undefined reference to _strnlen #4

richard-lyman opened this issue Feb 1, 2015 · 8 comments · Fixed by #5

Comments

@richard-lyman
Copy link

  • Ubuntu 14.04
  • sudo apt-cache show mingw32 : 4.2.1.dfsg-2ubuntu1
...
Linking C executable cmark.exe
CMakeFiles/cmark.dir/objects.a(houdini_html_u.c.obj):houdini_html_u.c:(.text+0x38f): undefined reference to `_strnlen'
collect2: ld returned 1 exit status
...
@jgm
Copy link
Member

jgm commented Feb 1, 2015

That's interesting. I have no problems with
Version: 4.9.1-4ubuntu3+14.1

but on another (debian) system with
Version: 4.2.1.dfsg-2
I see the same thing you're seeing.

Must have been added fairly recently.

See also:
http://sourceforge.net/p/mingw/bugs/1912/

We could add a check for strnlen, I suppose, and if not present include
one of the definitions given in that thread? But maybe not worth the
hassle, since newer versions of mingw seem to work.

@nwellnhof
Copy link
Contributor

Seems related to feature test macros. We probably have to compile with _POSIX_C_SOURCE in addition to _GNU_SOURCE. Can you check whether the following patch helps?

nwellnhof@dddc482

@richard-lyman
Copy link
Author

Same error with patch.

@richard-lyman
Copy link
Author

I ran and have since re-run with 'make clean' and it still shows the same
error.

On Sun, Feb 1, 2015 at 3:17 PM, Nick Wellnhofer notifications@github.com
wrote:

Did you maybe compile from previous checkout without running make clean?
If not, can you post the whole output of make VERBOSE=1?


Reply to this email directly or view it on GitHub
#4 (comment).

@nwellnhof
Copy link
Contributor

OK, then we should simply avoid strnlen. I'll probably have a fix ready by tomorrow.

@richard-lyman
Copy link
Author

Result of make VERBOSE=1 mingw after a make clean:

mkdir -p build-mingw; \
    cd build-mingw; \
    cmake .. -DCMAKE_TOOLCHAIN_FILE=../toolchain-mingw32.cmake -DCMAKE_INSTALL_PREFIX=windows ;\
    make && make install
Re-run cmake no build system arguments
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is GNU 4.2.1
-- Check for working C compiler: /usr/bin/i586-mingw32msvc-gcc
-- Check for working C compiler: /usr/bin/i586-mingw32msvc-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/i586-mingw32msvc-g++
-- Check for working CXX compiler: /usr/bin/i586-mingw32msvc-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Looking for stdbool.h
-- Looking for stdbool.h - found
-- Performing Test HAVE___BUILTIN_EXPECT
-- Performing Test HAVE___BUILTIN_EXPECT - Success
-- Performing Test HAVE___ATTRIBUTE__
-- Performing Test HAVE___ATTRIBUTE__ - Success
-- Looking for va_copy
-- Looking for va_copy - found
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.4", minimum required is "3") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/dl/cmark/cmark/build-mingw
make[1]: Entering directory `/home/user/dl/cmark/cmark/build-mingw'
/usr/bin/cmake -H/home/user/dl/cmark/cmark -B/home/user/dl/cmark/cmark/build-mingw --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/user/dl/cmark/cmark/build-mingw/CMakeFiles /home/user/dl/cmark/cmark/build-mingw/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[2]: Entering directory `/home/user/dl/cmark/cmark/build-mingw'
make -f src/CMakeFiles/cmark.dir/build.make src/CMakeFiles/cmark.dir/depend
make[3]: Entering directory `/home/user/dl/cmark/cmark/build-mingw'
cd /home/user/dl/cmark/cmark/build-mingw && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/user/dl/cmark/cmark /home/user/dl/cmark/cmark/src /home/user/dl/cmark/cmark/build-mingw /home/user/dl/cmark/cmark/build-mingw/src /home/user/dl/cmark/cmark/build-mingw/src/CMakeFiles/cmark.dir/DependInfo.cmake --color=
Dependee "/home/user/dl/cmark/cmark/build-mingw/src/CMakeFiles/cmark.dir/DependInfo.cmake" is newer than depender "/home/user/dl/cmark/cmark/build-mingw/src/CMakeFiles/cmark.dir/depend.internal".
Dependee "/home/user/dl/cmark/cmark/build-mingw/src/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/user/dl/cmark/cmark/build-mingw/src/CMakeFiles/cmark.dir/depend.internal".
Scanning dependencies of target cmark
make[3]: Leaving directory `/home/user/dl/cmark/cmark/build-mingw'
make -f src/CMakeFiles/cmark.dir/build.make src/CMakeFiles/cmark.dir/build
make[3]: Entering directory `/home/user/dl/cmark/cmark/build-mingw'
/usr/bin/cmake -E cmake_progress_report /home/user/dl/cmark/cmark/build-mingw/CMakeFiles 4
[  2%] Building C object src/CMakeFiles/cmark.dir/cmark.c.obj
cd /home/user/dl/cmark/cmark/build-mingw/src && /usr/bin/i586-mingw32msvc-gcc   -fvisibility=hidden -Wall -Wextra -std=c99 -pedantic -D_GNU_SOURCE -O3 -DNDEBUG @CMakeFiles/cmark.dir/includes_C.rsp   -DCMARK_STATIC_DEFINE -o CMakeFiles/cmark.dir/cmark.c.obj   -c /home/user/dl/cmark/cmark/src/cmark.c
/home/user/dl/cmark/cmark/src/cmark.c: In function ‘cmark_markdown_to_html’:
/home/user/dl/cmark/cmark/src/cmark.c:23: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/cmark.c: At top level:
/home/user/dl/cmark/cmark/src/cmark.c:23: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/cmark.c:23: warning: visibility attribute not supported in this configuration; ignored
/usr/bin/cmake -E cmake_progress_report /home/user/dl/cmark/cmark/build-mingw/CMakeFiles 5
[  5%] Building C object src/CMakeFiles/cmark.dir/node.c.obj
cd /home/user/dl/cmark/cmark/build-mingw/src && /usr/bin/i586-mingw32msvc-gcc   -fvisibility=hidden -Wall -Wextra -std=c99 -pedantic -D_GNU_SOURCE -O3 -DNDEBUG @CMakeFiles/cmark.dir/includes_C.rsp   -DCMARK_STATIC_DEFINE -o CMakeFiles/cmark.dir/node.c.obj   -c /home/user/dl/cmark/cmark/src/node.c
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_get_type’:
/home/user/dl/cmark/cmark/src/node.c:162: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_get_type_string’:
/home/user/dl/cmark/cmark/src/node.c:213: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_next’:
/home/user/dl/cmark/cmark/src/node.c:223: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_previous’:
/home/user/dl/cmark/cmark/src/node.c:233: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_parent’:
/home/user/dl/cmark/cmark/src/node.c:243: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_first_child’:
/home/user/dl/cmark/cmark/src/node.c:253: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_last_child’:
/home/user/dl/cmark/cmark/src/node.c:263: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_get_user_data’:
/home/user/dl/cmark/cmark/src/node.c:272: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_set_user_data’:
/home/user/dl/cmark/cmark/src/node.c:281: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_get_header_level’:
/home/user/dl/cmark/cmark/src/node.c:358: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_set_header_level’:
/home/user/dl/cmark/cmark/src/node.c:377: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_get_list_type’:
/home/user/dl/cmark/cmark/src/node.c:391: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_set_list_type’:
/home/user/dl/cmark/cmark/src/node.c:410: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_get_list_delim’:
/home/user/dl/cmark/cmark/src/node.c:424: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_set_list_delim’:
/home/user/dl/cmark/cmark/src/node.c:443: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_get_list_start’:
/home/user/dl/cmark/cmark/src/node.c:457: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_set_list_start’:
/home/user/dl/cmark/cmark/src/node.c:472: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_get_list_tight’:
/home/user/dl/cmark/cmark/src/node.c:486: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_set_list_tight’:
/home/user/dl/cmark/cmark/src/node.c:501: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_get_url’:
/home/user/dl/cmark/cmark/src/node.c:548: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_get_title’:
/home/user/dl/cmark/cmark/src/node.c:586: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_get_start_line’:
/home/user/dl/cmark/cmark/src/node.c:615: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_get_start_column’:
/home/user/dl/cmark/cmark/src/node.c:624: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_get_end_line’:
/home/user/dl/cmark/cmark/src/node.c:633: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_get_end_column’:
/home/user/dl/cmark/cmark/src/node.c:642: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_unlink’:
/home/user/dl/cmark/cmark/src/node.c:680: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_set_title’:
/home/user/dl/cmark/cmark/src/node.c:606: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_new’:
/home/user/dl/cmark/cmark/src/node.c:101: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_insert_after’:
/home/user/dl/cmark/cmark/src/node.c:750: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_free’:
/home/user/dl/cmark/cmark/src/node.c:152: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_check’:
/home/user/dl/cmark/cmark/src/node.c:871: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_insert_before’:
/home/user/dl/cmark/cmark/src/node.c:715: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_append_child’:
/home/user/dl/cmark/cmark/src/node.c:802: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_prepend_child’:
/home/user/dl/cmark/cmark/src/node.c:776: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_set_url’:
/home/user/dl/cmark/cmark/src/node.c:568: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_get_fence_info’:
/home/user/dl/cmark/cmark/src/node.c:515: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_get_literal’:
/home/user/dl/cmark/cmark/src/node.c:314: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_set_literal’:
/home/user/dl/cmark/cmark/src/node.c:340: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/node.c: In function ‘cmark_node_set_fence_info’:
/home/user/dl/cmark/cmark/src/node.c:530: warning: visibility attribute not supported in this configuration; ignored
/usr/bin/cmake -E cmake_progress_report /home/user/dl/cmark/cmark/build-mingw/CMakeFiles 6
[  8%] Building C object src/CMakeFiles/cmark.dir/iterator.c.obj
cd /home/user/dl/cmark/cmark/build-mingw/src && /usr/bin/i586-mingw32msvc-gcc   -fvisibility=hidden -Wall -Wextra -std=c99 -pedantic -D_GNU_SOURCE -O3 -DNDEBUG @CMakeFiles/cmark.dir/includes_C.rsp   -DCMARK_STATIC_DEFINE -o CMakeFiles/cmark.dir/iterator.c.obj   -c /home/user/dl/cmark/cmark/src/iterator.c
/home/user/dl/cmark/cmark/src/iterator.c: In function ‘cmark_iter_next’:
/home/user/dl/cmark/cmark/src/iterator.c:88: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/iterator.c: In function ‘cmark_iter_get_node’:
/home/user/dl/cmark/cmark/src/iterator.c:103: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/iterator.c: In function ‘cmark_iter_get_event_type’:
/home/user/dl/cmark/cmark/src/iterator.c:109: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/iterator.c: In function ‘cmark_iter_get_root’:
/home/user/dl/cmark/cmark/src/iterator.c:115: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/iterator.c: In function ‘cmark_iter_free’:
/home/user/dl/cmark/cmark/src/iterator.c:41: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/iterator.c: In function ‘cmark_iter_new’:
/home/user/dl/cmark/cmark/src/iterator.c:35: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/iterator.c: In function ‘cmark_consolidate_text_nodes’:
/home/user/dl/cmark/cmark/src/iterator.c:146: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/iterator.c: In function ‘cmark_iter_reset’:
/home/user/dl/cmark/cmark/src/iterator.c:97: warning: visibility attribute not supported in this configuration; ignored
/usr/bin/cmake -E cmake_progress_report /home/user/dl/cmark/cmark/build-mingw/CMakeFiles 7
[ 11%] Building C object src/CMakeFiles/cmark.dir/blocks.c.obj
cd /home/user/dl/cmark/cmark/build-mingw/src && /usr/bin/i586-mingw32msvc-gcc   -fvisibility=hidden -Wall -Wextra -std=c99 -pedantic -D_GNU_SOURCE -O3 -DNDEBUG @CMakeFiles/cmark.dir/includes_C.rsp   -DCMARK_STATIC_DEFINE -o CMakeFiles/cmark.dir/blocks.c.obj   -c /home/user/dl/cmark/cmark/src/blocks.c
/home/user/dl/cmark/cmark/src/blocks.c: In function ‘cmark_parser_free’:
/home/user/dl/cmark/cmark/src/blocks.c:81: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/blocks.c: In function ‘cmark_parser_new’:
/home/user/dl/cmark/cmark/src/blocks.c:71: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/blocks.c: In function ‘cmark_parser_finish’:
/home/user/dl/cmark/cmark/src/blocks.c:878: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/blocks.c: In function ‘cmark_parser_feed’:
/home/user/dl/cmark/cmark/src/blocks.c:460: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/blocks.c: In function ‘cmark_parse_document’:
/home/user/dl/cmark/cmark/src/blocks.c:454: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/blocks.c: In function ‘cmark_parse_file’:
/home/user/dl/cmark/cmark/src/blocks.c:442: warning: visibility attribute not supported in this configuration; ignored
/usr/bin/cmake -E cmake_progress_report /home/user/dl/cmark/cmark/build-mingw/CMakeFiles 8
[ 13%] Building C object src/CMakeFiles/cmark.dir/inlines.c.obj
cd /home/user/dl/cmark/cmark/build-mingw/src && /usr/bin/i586-mingw32msvc-gcc   -fvisibility=hidden -Wall -Wextra -std=c99 -pedantic -D_GNU_SOURCE -O3 -DNDEBUG @CMakeFiles/cmark.dir/includes_C.rsp   -DCMARK_STATIC_DEFINE -o CMakeFiles/cmark.dir/inlines.c.obj   -c /home/user/dl/cmark/cmark/src/inlines.c
/home/user/dl/cmark/cmark/src/inlines.c: In function ‘cmark_clean_title’:
/home/user/dl/cmark/cmark/src/inlines.c:581: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/inlines.c: In function ‘cmark_clean_url’:
/home/user/dl/cmark/cmark/src/inlines.c:557: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/inlines.c: In function ‘cmark_parse_reference_inline’:
/home/user/dl/cmark/cmark/src/inlines.c:1031: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/inlines.c: In function ‘cmark_parse_inlines’:
/home/user/dl/cmark/cmark/src/inlines.c:957: warning: visibility attribute not supported in this configuration; ignored
/usr/bin/cmake -E cmake_progress_report /home/user/dl/cmark/cmark/build-mingw/CMakeFiles 9
[ 16%] Building C object src/CMakeFiles/cmark.dir/scanners.c.obj
cd /home/user/dl/cmark/cmark/build-mingw/src && /usr/bin/i586-mingw32msvc-gcc   -fvisibility=hidden -Wall -Wextra -std=c99 -pedantic -D_GNU_SOURCE -O3 -DNDEBUG @CMakeFiles/cmark.dir/includes_C.rsp   -DCMARK_STATIC_DEFINE -o CMakeFiles/cmark.dir/scanners.c.obj   -c /home/user/dl/cmark/cmark/src/scanners.c
/home/user/dl/cmark/cmark/src/scanners.c: In function ‘_scan_at’:
/home/user/dl/cmark/cmark/src/scanners.c:17: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/scanners.c: In function ‘_scan_autolink_uri’:
/home/user/dl/cmark/cmark/src/scanners.c:2959: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/scanners.c: In function ‘_scan_autolink_email’:
/home/user/dl/cmark/cmark/src/scanners.c:7904: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/scanners.c: In function ‘_scan_html_tag’:
/home/user/dl/cmark/cmark/src/scanners.c:8555: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/scanners.c: In function ‘_scan_html_block_tag’:
/home/user/dl/cmark/cmark/src/scanners.c:10341: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/scanners.c: In function ‘_scan_link_url’:
/home/user/dl/cmark/cmark/src/scanners.c:10792: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/scanners.c: In function ‘_scan_link_title’:
/home/user/dl/cmark/cmark/src/scanners.c:10984: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/scanners.c: In function ‘_scan_spacechars’:
/home/user/dl/cmark/cmark/src/scanners.c:11054: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/scanners.c: In function ‘_scan_atx_header_start’:
/home/user/dl/cmark/cmark/src/scanners.c:11163: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/scanners.c: In function ‘_scan_setext_header_line’:
/home/user/dl/cmark/cmark/src/scanners.c:11278: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/scanners.c: In function ‘_scan_hrule’:
/home/user/dl/cmark/cmark/src/scanners.c:11463: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/scanners.c: In function ‘_scan_open_code_fence’:
/home/user/dl/cmark/cmark/src/scanners.c:11588: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/scanners.c: In function ‘_scan_close_code_fence’:
/home/user/dl/cmark/cmark/src/scanners.c:11717: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/scanners.c: In function ‘_scan_entity’:
/home/user/dl/cmark/cmark/src/scanners.c:12391: warning: visibility attribute not supported in this configuration; ignored
/usr/bin/cmake -E cmake_progress_report /home/user/dl/cmark/cmark/build-mingw/CMakeFiles 10
[ 19%] Building C object src/CMakeFiles/cmark.dir/utf8.c.obj
cd /home/user/dl/cmark/cmark/build-mingw/src && /usr/bin/i586-mingw32msvc-gcc   -fvisibility=hidden -Wall -Wextra -std=c99 -pedantic -D_GNU_SOURCE -O3 -DNDEBUG @CMakeFiles/cmark.dir/includes_C.rsp   -DCMARK_STATIC_DEFINE -o CMakeFiles/cmark.dir/utf8.c.obj   -c /home/user/dl/cmark/cmark/src/utf8.c
/home/user/dl/cmark/cmark/src/utf8.c: In function ‘utf8proc_iterate’:
/home/user/dl/cmark/cmark/src/utf8.c:190: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/utf8.c: In function ‘utf8proc_is_space’:
/home/user/dl/cmark/cmark/src/utf8.c:267: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/utf8.c: In function ‘utf8proc_is_punctuation’:
/home/user/dl/cmark/cmark/src/utf8.c:453: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/utf8.c: In function ‘utf8proc_encode_char’:
/home/user/dl/cmark/cmark/src/utf8.c:229: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/utf8.c: In function ‘utf8proc_detab’:
/home/user/dl/cmark/cmark/src/utf8.c:152: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/utf8.c: In function ‘utf8proc_case_fold’:
/home/user/dl/cmark/cmark/src/utf8.c:251: warning: visibility attribute not supported in this configuration; ignored
/usr/bin/cmake -E cmake_progress_report /home/user/dl/cmark/cmark/build-mingw/CMakeFiles 11
[ 22%] Building C object src/CMakeFiles/cmark.dir/buffer.c.obj
cd /home/user/dl/cmark/cmark/build-mingw/src && /usr/bin/i586-mingw32msvc-gcc   -fvisibility=hidden -Wall -Wextra -std=c99 -pedantic -D_GNU_SOURCE -O3 -DNDEBUG @CMakeFiles/cmark.dir/includes_C.rsp   -DCMARK_STATIC_DEFINE -o CMakeFiles/cmark.dir/buffer.c.obj   -c /home/user/dl/cmark/cmark/src/buffer.c
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_oom’:
/home/user/dl/cmark/cmark/src/buffer.c:90: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_len’:
/home/user/dl/cmark/cmark/src/buffer.c:95: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_clear’:
/home/user/dl/cmark/cmark/src/buffer.c:113: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_swap’:
/home/user/dl/cmark/cmark/src/buffer.c:233: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_strrchr’:
/home/user/dl/cmark/cmark/src/buffer.c:290: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_truncate’:
/home/user/dl/cmark/cmark/src/buffer.c:298: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_rtrim’:
/home/user/dl/cmark/cmark/src/buffer.c:324: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_drop’:
/home/user/dl/cmark/cmark/src/buffer.c:309: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_copy_cstr’:
/home/user/dl/cmark/cmark/src/buffer.c:226: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_strchr’:
/home/user/dl/cmark/cmark/src/buffer.c:278: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_cmp’:
/home/user/dl/cmark/cmark/src/buffer.c:269: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_try_grow’:
/home/user/dl/cmark/cmark/src/buffer.c:80: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_normalize_whitespace’:
/home/user/dl/cmark/cmark/src/buffer.c:366: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_unescape’:
/home/user/dl/cmark/cmark/src/buffer.c:381: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_trim’:
/home/user/dl/cmark/cmark/src/buffer.c:339: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_grow’:
/home/user/dl/cmark/cmark/src/buffer.c:85: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_put’:
/home/user/dl/cmark/cmark/src/buffer.c:155: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_putc’:
/home/user/dl/cmark/cmark/src/buffer.c:143: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_set’:
/home/user/dl/cmark/cmark/src/buffer.c:128: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_init’:
/home/user/dl/cmark/cmark/src/buffer.c:34: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_vprintf’:
/home/user/dl/cmark/cmark/src/buffer.c:196: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_printf’:
/home/user/dl/cmark/cmark/src/buffer.c:208: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_detach’:
/home/user/dl/cmark/cmark/src/buffer.c:246: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_free’:
/home/user/dl/cmark/cmark/src/buffer.c:105: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_attach’:
/home/user/dl/cmark/cmark/src/buffer.c:262: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_puts’:
/home/user/dl/cmark/cmark/src/buffer.c:160: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: In function ‘cmark_strbuf_sets’:
/home/user/dl/cmark/cmark/src/buffer.c:135: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c: At top level:
/home/user/dl/cmark/cmark/src/buffer.c:381: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/buffer.c:381: warning: visibility attribute not supported in this configuration; ignored
/usr/bin/cmake -E cmake_progress_report /home/user/dl/cmark/cmark/build-mingw/CMakeFiles 12
[ 25%] Building C object src/CMakeFiles/cmark.dir/references.c.obj
cd /home/user/dl/cmark/cmark/build-mingw/src && /usr/bin/i586-mingw32msvc-gcc   -fvisibility=hidden -Wall -Wextra -std=c99 -pedantic -D_GNU_SOURCE -O3 -DNDEBUG @CMakeFiles/cmark.dir/includes_C.rsp   -DCMARK_STATIC_DEFINE -o CMakeFiles/cmark.dir/references.c.obj   -c /home/user/dl/cmark/cmark/src/references.c
/home/user/dl/cmark/cmark/src/references.c: In function ‘cmark_reference_map_new’:
/home/user/dl/cmark/cmark/src/references.c:154: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/references.c: In function ‘cmark_reference_create’:
/home/user/dl/cmark/cmark/src/references.c:96: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/references.c: In function ‘cmark_reference_map_free’:
/home/user/dl/cmark/cmark/src/references.c:149: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/references.c: In function ‘cmark_reference_lookup’:
/home/user/dl/cmark/cmark/src/references.c:128: warning: visibility attribute not supported in this configuration; ignored
/usr/bin/cmake -E cmake_progress_report /home/user/dl/cmark/cmark/build-mingw/CMakeFiles 13
[ 27%] Building C object src/CMakeFiles/cmark.dir/man.c.obj
cd /home/user/dl/cmark/cmark/build-mingw/src && /usr/bin/i586-mingw32msvc-gcc   -fvisibility=hidden -Wall -Wextra -std=c99 -pedantic -D_GNU_SOURCE -O3 -DNDEBUG @CMakeFiles/cmark.dir/includes_C.rsp   -DCMARK_STATIC_DEFINE -o CMakeFiles/cmark.dir/man.c.obj   -c /home/user/dl/cmark/cmark/src/man.c
/home/user/dl/cmark/cmark/src/man.c: In function ‘cmark_render_man’:
/home/user/dl/cmark/cmark/src/man.c:250: warning: visibility attribute not supported in this configuration; ignored
/usr/bin/cmake -E cmake_progress_report /home/user/dl/cmark/cmark/build-mingw/CMakeFiles 14
[ 30%] Building C object src/CMakeFiles/cmark.dir/xml.c.obj
cd /home/user/dl/cmark/cmark/build-mingw/src && /usr/bin/i586-mingw32msvc-gcc   -fvisibility=hidden -Wall -Wextra -std=c99 -pedantic -D_GNU_SOURCE -O3 -DNDEBUG @CMakeFiles/cmark.dir/includes_C.rsp   -DCMARK_STATIC_DEFINE -o CMakeFiles/cmark.dir/xml.c.obj   -c /home/user/dl/cmark/cmark/src/xml.c
/home/user/dl/cmark/cmark/src/xml.c: In function ‘cmark_render_xml’:
/home/user/dl/cmark/cmark/src/xml.c:174: warning: visibility attribute not supported in this configuration; ignored
/usr/bin/cmake -E cmake_progress_report /home/user/dl/cmark/cmark/build-mingw/CMakeFiles 15
[ 33%] Building C object src/CMakeFiles/cmark.dir/html.c.obj
cd /home/user/dl/cmark/cmark/build-mingw/src && /usr/bin/i586-mingw32msvc-gcc   -fvisibility=hidden -Wall -Wextra -std=c99 -pedantic -D_GNU_SOURCE -O3 -DNDEBUG @CMakeFiles/cmark.dir/includes_C.rsp   -DCMARK_STATIC_DEFINE -o CMakeFiles/cmark.dir/html.c.obj   -c /home/user/dl/cmark/cmark/src/html.c
/home/user/dl/cmark/cmark/src/html.c: In function ‘cmark_render_html’:
/home/user/dl/cmark/cmark/src/html.c:323: warning: visibility attribute not supported in this configuration; ignored
/usr/bin/cmake -E cmake_progress_report /home/user/dl/cmark/cmark/build-mingw/CMakeFiles 16
[ 36%] Building C object src/CMakeFiles/cmark.dir/houdini_href_e.c.obj
cd /home/user/dl/cmark/cmark/build-mingw/src && /usr/bin/i586-mingw32msvc-gcc   -fvisibility=hidden -Wall -Wextra -std=c99 -pedantic -D_GNU_SOURCE -O3 -DNDEBUG @CMakeFiles/cmark.dir/includes_C.rsp   -DCMARK_STATIC_DEFINE -o CMakeFiles/cmark.dir/houdini_href_e.c.obj   -c /home/user/dl/cmark/cmark/src/houdini_href_e.c
/home/user/dl/cmark/cmark/src/houdini_href_e.c: In function ‘houdini_escape_href’:
/home/user/dl/cmark/cmark/src/houdini_href_e.c:107: warning: visibility attribute not supported in this configuration; ignored
/usr/bin/cmake -E cmake_progress_report /home/user/dl/cmark/cmark/build-mingw/CMakeFiles 17
[ 38%] Building C object src/CMakeFiles/cmark.dir/houdini_html_e.c.obj
cd /home/user/dl/cmark/cmark/build-mingw/src && /usr/bin/i586-mingw32msvc-gcc   -fvisibility=hidden -Wall -Wextra -std=c99 -pedantic -D_GNU_SOURCE -O3 -DNDEBUG @CMakeFiles/cmark.dir/includes_C.rsp   -DCMARK_STATIC_DEFINE -o CMakeFiles/cmark.dir/houdini_html_e.c.obj   -c /home/user/dl/cmark/cmark/src/houdini_html_e.c
/home/user/dl/cmark/cmark/src/houdini_html_e.c: In function ‘houdini_escape_html0’:
/home/user/dl/cmark/cmark/src/houdini_html_e.c:75: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/houdini_html_e.c: In function ‘houdini_escape_html’:
/home/user/dl/cmark/cmark/src/houdini_html_e.c:81: warning: visibility attribute not supported in this configuration; ignored
/usr/bin/cmake -E cmake_progress_report /home/user/dl/cmark/cmark/build-mingw/CMakeFiles 18
[ 41%] Building C object src/CMakeFiles/cmark.dir/houdini_html_u.c.obj
cd /home/user/dl/cmark/cmark/build-mingw/src && /usr/bin/i586-mingw32msvc-gcc   -fvisibility=hidden -Wall -Wextra -std=c99 -pedantic -D_GNU_SOURCE -O3 -DNDEBUG @CMakeFiles/cmark.dir/includes_C.rsp   -DCMARK_STATIC_DEFINE -o CMakeFiles/cmark.dir/houdini_html_u.c.obj   -c /home/user/dl/cmark/cmark/src/houdini_html_u.c
/home/user/dl/cmark/cmark/src/houdini_html_u.c: In function ‘houdini_unescape_ent’:
/home/user/dl/cmark/cmark/src/houdini_html_u.c:58: warning: implicit declaration of function ‘strnlen’
src/html_unescape.gperf: In function ‘find_entity’:
src/html_unescape.gperf:351: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/houdini_html_u.c: In function ‘houdini_unescape_ent’:
/home/user/dl/cmark/cmark/src/houdini_html_u.c:69: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/houdini_html_u.c: In function ‘houdini_unescape_html’:
/home/user/dl/cmark/cmark/src/houdini_html_u.c:107: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/houdini_html_u.c: In function ‘houdini_unescape_html_f’:
/home/user/dl/cmark/cmark/src/houdini_html_u.c:113: warning: visibility attribute not supported in this configuration; ignored
/usr/bin/cmake -E cmake_progress_report /home/user/dl/cmark/cmark/build-mingw/CMakeFiles 19
[ 44%] Building C object src/CMakeFiles/cmark.dir/cmark_ctype.c.obj
cd /home/user/dl/cmark/cmark/build-mingw/src && /usr/bin/i586-mingw32msvc-gcc   -fvisibility=hidden -Wall -Wextra -std=c99 -pedantic -D_GNU_SOURCE -O3 -DNDEBUG @CMakeFiles/cmark.dir/includes_C.rsp   -DCMARK_STATIC_DEFINE -o CMakeFiles/cmark.dir/cmark_ctype.c.obj   -c /home/user/dl/cmark/cmark/src/cmark_ctype.c
/home/user/dl/cmark/cmark/src/cmark_ctype.c: In function ‘cmark_isspace’:
/home/user/dl/cmark/cmark/src/cmark_ctype.c:33: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/cmark_ctype.c: In function ‘cmark_ispunct’:
/home/user/dl/cmark/cmark/src/cmark_ctype.c:41: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/cmark_ctype.c: In function ‘cmark_isalnum’:
/home/user/dl/cmark/cmark/src/cmark_ctype.c:48: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/cmark_ctype.c: In function ‘cmark_isdigit’:
/home/user/dl/cmark/cmark/src/cmark_ctype.c:53: warning: visibility attribute not supported in this configuration; ignored
/usr/bin/cmake -E cmake_progress_report /home/user/dl/cmark/cmark/build-mingw/CMakeFiles 20
[ 47%] Building C object src/CMakeFiles/cmark.dir/main.c.obj
cd /home/user/dl/cmark/cmark/build-mingw/src && /usr/bin/i586-mingw32msvc-gcc   -fvisibility=hidden -Wall -Wextra -std=c99 -pedantic -D_GNU_SOURCE -O3 -DNDEBUG @CMakeFiles/cmark.dir/includes_C.rsp   -DCMARK_STATIC_DEFINE -o CMakeFiles/cmark.dir/main.c.obj   -c /home/user/dl/cmark/cmark/src/main.c
/home/user/dl/cmark/cmark/src/main.c: In function ‘main’:
/home/user/dl/cmark/cmark/src/main.c:68: warning: implicit declaration of function ‘_fileno’
/home/user/dl/cmark/cmark/src/main.c: In function ‘print_usage’:
/home/user/dl/cmark/cmark/src/main.c:32: warning: visibility attribute not supported in this configuration; ignored
/home/user/dl/cmark/cmark/src/main.c: In function ‘main’:
/home/user/dl/cmark/cmark/src/main.c:163: warning: visibility attribute not supported in this configuration; ignored
Linking C executable cmark.exe
cd /home/user/dl/cmark/cmark/build-mingw/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/cmark.dir/link.txt --verbose=1
/usr/bin/cmake -E remove -f CMakeFiles/cmark.dir/objects.a
/usr/bin/i586-mingw32msvc-ar cr CMakeFiles/cmark.dir/objects.a @CMakeFiles/cmark.dir/objects1.rsp
/usr/bin/i586-mingw32msvc-gcc   -fvisibility=hidden -Wall -Wextra -std=c99 -pedantic -D_GNU_SOURCE -O3 -DNDEBUG    -Wl,--whole-archive CMakeFiles/cmark.dir/objects.a -Wl,--no-whole-archive  -o cmark.exe -Wl,--out-implib,libcmark.dll.a -Wl,--major-image-version,0,--minor-image-version,0  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 
CMakeFiles/cmark.dir/objects.a(houdini_html_u.c.obj):houdini_html_u.c:(.text+0x38f): undefined reference to `_strnlen'
collect2: ld returned 1 exit status
make[3]: *** [src/cmark.exe] Error 1
make[3]: Leaving directory `/home/user/dl/cmark/cmark/build-mingw'
make[2]: *** [src/CMakeFiles/cmark.dir/all] Error 2
make[2]: Leaving directory `/home/user/dl/cmark/cmark/build-mingw'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/user/dl/cmark/cmark/build-mingw'
make: *** [mingw] Error 2

@jgm
Copy link
Member

jgm commented Feb 2, 2015

Confirmed: With this fix I can build with the older mingw version. Thanks!

@richard-lyman
Copy link
Author

Works for me as well - thanks for the quick response.

tinysun212 pushed a commit to tinysun212/cmark that referenced this issue May 15, 2017
PKRoma pushed a commit to PKRoma/cmark that referenced this issue Aug 19, 2018
* Include table alignment when rendering LaTeX
* Include table alignment when rendering man (preserving default centre
  alignment here)
* Trim table cell interiors
* Expand test cases
* Fix escaping behaviour
* Do not use enum for alignment
* Do not collide against stdlib `ispunct`
* Cleanup pipe code
* Don't reparse matched rows
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

Successfully merging a pull request may close this issue.

3 participants