Opened 13 years ago

Closed 13 years ago

#32577 closed defect (fixed)

libewf build error with clang

Reported by: mf2k (Frank Schima) Owned by: opendarwin.org@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: clang haspatch Cc: ranauei@…, ryandesign (Ryan Carsten Schmidt)
Port: libewf

Description

I'm seeing the following build error for libewf on Mac OS X 10.7.2. Xcode 4.2.1.

"/opt/local/var/macports/build/_opt_mports_trunk_dports_security_libewf/libewf/work/libewf-20100226/libewf/../libbfio/.libs/libbfio.a")
:info:build libtool: link: /Developer/usr/bin/clang -dynamiclib  -o .libs/libewf.1.dylib  .libs/libewf.o .libs/libewf_chunk_cache.o .libs/libewf_compression.o .libs/libewf_date_time.o .libs/libewf_date_time_values.o .libs/libewf_debug.o .libs/libewf_empty_block.o .libs/libewf_error.o .libs/libewf_filename.o .libs/libewf_handle.o .libs/libewf_hash_sections.o .libs/libewf_hash_values.o .libs/libewf_header_sections.o .libs/libewf_header_values.o .libs/libewf_io_handle.o .libs/libewf_legacy.o .libs/libewf_list_type.o .libs/libewf_media_values.o .libs/libewf_metadata.o .libs/libewf_notify.o .libs/libewf_offset_table.o .libs/libewf_read_io_handle.o .libs/libewf_section.o .libs/libewf_section_list.o .libs/libewf_sector_table.o .libs/libewf_segment_file.o .libs/libewf_segment_file_handle.o .libs/libewf_segment_table.o .libs/libewf_string.o .libs/libewf_support.o .libs/libewf_values_table.o .libs/libewf_write_io_handle.o   .libs/libewf.lax/liberror.a/liberror_error.o  .libs/libewf.lax/libnotify.a/libnotify.o  .libs/libewf.lax/libuna.a/libuna_base64_stream.o .libs/libewf.lax/libuna.a/libuna_base64url_stream.o .libs/libewf.lax/libuna.a/libuna_byte_stream.o .libs/libewf.lax/libuna.a/libuna_codepage_iso_8859_10.o .libs/libewf.lax/libuna.a/libuna_codepage_iso_8859_13.o .libs/libewf.lax/libuna.a/libuna_codepage_iso_8859_14.o .libs/libewf.lax/libuna.a/libuna_codepage_iso_8859_15.o .libs/libewf.lax/libuna.a/libuna_codepage_iso_8859_16.o .libs/libewf.lax/libuna.a/libuna_codepage_iso_8859_2.o .libs/libewf.lax/libuna.a/libuna_codepage_iso_8859_3.o .libs/libewf.lax/libuna.a/libuna_codepage_iso_8859_4.o .libs/libewf.lax/libuna.a/libuna_codepage_iso_8859_5.o .libs/libewf.lax/libuna.a/libuna_codepage_iso_8859_6.o .libs/libewf.lax/libuna.a/libuna_codepage_iso_8859_7.o .libs/libewf.lax/libuna.a/libuna_codepage_iso_8859_8.o .libs/libewf.lax/libuna.a/libuna_codepage_iso_8859_9.o .libs/libewf.lax/libuna.a/libuna_codepage_koi8_r.o .libs/libewf.lax/libuna.a/libuna_codepage_koi8_u.o .libs/libewf.lax/libuna.a/libuna_codepage_windows_1250.o .libs/libewf.lax/libuna.a/libuna_codepage_windows_1251.o .libs/libewf.lax/libuna.a/libuna_codepage_windows_1252.o .libs/libewf.lax/libuna.a/libuna_codepage_windows_1253.o .libs/libewf.lax/libuna.a/libuna_codepage_windows_1254.o .libs/libewf.lax/libuna.a/libuna_codepage_windows_1255.o .libs/libewf.lax/libuna.a/libuna_codepage_windows_1256.o .libs/libewf.lax/libuna.a/libuna_codepage_windows_1257.o .libs/libewf.lax/libuna.a/libuna_codepage_windows_1258.o .libs/libewf.lax/libuna.a/libuna_codepage_windows_874.o .libs/libewf.lax/libuna.a/libuna_compare.o .libs/libewf.lax/libuna.a/libuna_support.o .libs/libewf.lax/libuna.a/libuna_unicode_character.o .libs/libewf.lax/libuna.a/libuna_utf16_stream.o .libs/libewf.lax/libuna.a/libuna_utf16_string.o .libs/libewf.lax/libuna.a/libuna_utf32_stream.o .libs/libewf.lax/libuna.a/libuna_utf32_string.o .libs/libewf.lax/libuna.a/libuna_utf8_stream.o .libs/libewf.lax/libuna.a/libuna_utf8_string.o  .libs/libewf.lax/libbfio.a/libbfio_error_string.o .libs/libewf.lax/libbfio.a/libbfio_file.o .libs/libewf.lax/libbfio.a/libbfio_handle.o .libs/libewf.lax/libbfio.a/libbfio_list_type.o .libs/libewf.lax/libbfio.a/libbfio_memory_range.o .libs/libewf.lax/libbfio.a/libbfio_offset_list.o .libs/libewf.lax/libbfio.a/libbfio_pool.o .libs/libewf.lax/libbfio.a/libbfio_support.o   -L/opt/local/lib -lz  -arch x86_64 -arch x86_64   -install_name  /opt/local/lib/libewf.1.dylib -compatibility_version 2 -current_version 2.4 -Wl,-single_module
:info:build Undefined symbols for architecture x86_64:
:info:build   "_libuna_base64_triplet_copy_to_byte_stream", referenced from:
:info:build       _libuna_base64_stream_decode in libuna_base64_stream.o
:info:build   "_libuna_base64_triplet_copy_from_base64_stream", referenced from:
:info:build       _libuna_base64_stream_decode in libuna_base64_stream.o
:info:build   "_libuna_base64_triplet_copy_to_base64_stream", referenced from:
:info:build       _libuna_base64_stream_encode in libuna_base64_stream.o
:info:build   "_libuna_base64_triplet_copy_from_byte_stream", referenced from:
:info:build       _libuna_base64_stream_encode in libuna_base64_stream.o
:info:build   "_libuna_unicode_character_size_to_byte_stream", referenced from:
:info:build       _libuna_byte_stream_size_from_utf8 in libuna_byte_stream.o
:info:build       _libuna_byte_stream_size_from_utf16 in libuna_byte_stream.o
:info:build       _libuna_byte_stream_size_from_utf32 in libuna_byte_stream.o
:info:build   "_libuna_unicode_character_copy_from_utf8", referenced from:
:info:build       _libuna_byte_stream_size_from_utf8 in libuna_byte_stream.o
:info:build       _libuna_byte_stream_copy_from_utf8 in libuna_byte_stream.o
:info:build       _libuna_compare_utf8_with_utf16 in libuna_compare.o
:info:build       _libuna_compare_utf8_with_utf32 in libuna_compare.o
:info:build       _libuna_utf16_stream_size_from_utf8 in libuna_utf16_stream.o
:info:build       _libuna_utf16_stream_copy_from_utf8 in libuna_utf16_stream.o
:info:build       _libuna_utf16_string_size_from_utf8 in libuna_utf16_string.o
:info:build       ...
:info:build   "_libuna_unicode_character_copy_to_byte_stream", referenced from:
:info:build       _libuna_byte_stream_copy_from_utf8 in libuna_byte_stream.o
:info:build       _libuna_byte_stream_copy_from_utf16 in libuna_byte_stream.o
:info:build       _libuna_byte_stream_copy_from_utf32 in libuna_byte_stream.o
:info:build   "_libuna_unicode_character_copy_from_utf16", referenced from:
:info:build       _libuna_byte_stream_size_from_utf16 in libuna_byte_stream.o
:info:build       _libuna_byte_stream_copy_from_utf16 in libuna_byte_stream.o
:info:build       _libuna_compare_utf8_with_utf16 in libuna_compare.o
:info:build       _libuna_compare_utf16_with_utf32 in libuna_compare.o
:info:build       _libuna_utf32_stream_size_from_utf16 in libuna_utf32_stream.o
:info:build       _libuna_utf32_stream_copy_from_utf16 in libuna_utf32_stream.o
:info:build       _libuna_utf32_string_size_from_utf16 in libuna_utf32_string.o
:info:build       ...
:info:build   "_libuna_unicode_character_copy_from_utf32", referenced from:
:info:build       _libuna_byte_stream_size_from_utf32 in libuna_byte_stream.o
:info:build       _libuna_byte_stream_copy_from_utf32 in libuna_byte_stream.o
:info:build       _libuna_compare_utf8_with_utf32 in libuna_compare.o
:info:build       _libuna_compare_utf16_with_utf32 in libuna_compare.o
:info:build       _libuna_utf16_stream_size_from_utf32 in libuna_utf16_stream.o
:info:build       _libuna_utf16_stream_copy_from_utf32 in libuna_utf16_stream.o
:info:build       _libuna_utf16_string_size_from_utf32 in libuna_utf16_string.o
:info:build       ...
:info:build   "_libuna_unicode_character_size_to_utf16", referenced from:
:info:build       _libuna_utf16_stream_size_from_utf8 in libuna_utf16_stream.o
:info:build       _libuna_utf16_stream_size_from_utf32 in libuna_utf16_stream.o
:info:build       _libuna_utf16_string_size_from_byte_stream in libuna_utf16_string.o
:info:build       _libuna_utf16_string_size_from_utf8 in libuna_utf16_string.o
:info:build       _libuna_utf16_string_size_from_utf8_stream in libuna_utf16_string.o
:info:build       _libuna_utf16_string_size_from_utf16_stream in libuna_utf16_string.o
:info:build       _libuna_utf16_string_size_from_utf32 in libuna_utf16_string.o
:info:build       ...
:info:build   "_libuna_utf16_stream_copy_byte_order_mark", referenced from:
:info:build       _libuna_utf16_stream_copy_from_utf8 in libuna_utf16_stream.o
:info:build       _libuna_utf16_stream_copy_from_utf16 in libuna_utf16_stream.o
:info:build       _libuna_utf16_stream_copy_from_utf32 in libuna_utf16_stream.o
:info:build   "_libuna_unicode_character_copy_to_utf16_stream", referenced from:
:info:build       _libuna_utf16_stream_copy_from_utf8 in libuna_utf16_stream.o
:info:build       _libuna_utf16_stream_copy_from_utf32 in libuna_utf16_stream.o
:info:build   "_libuna_unicode_character_copy_from_byte_stream", referenced from:
:info:build       _libuna_utf16_string_size_from_byte_stream in libuna_utf16_string.o
:info:build       _libuna_utf16_string_copy_from_byte_stream in libuna_utf16_string.o
:info:build       _libuna_utf32_string_size_from_byte_stream in libuna_utf32_string.o
:info:build       _libuna_utf32_string_copy_from_byte_stream in libuna_utf32_string.o
:info:build       _libuna_utf8_string_size_from_byte_stream in libuna_utf8_string.o
:info:build       _libuna_utf8_string_copy_from_byte_stream in libuna_utf8_string.o
:info:build   "_libuna_unicode_character_copy_to_utf16", referenced from:
:info:build       _libuna_utf16_string_copy_from_byte_stream in libuna_utf16_string.o
:info:build       _libuna_utf16_string_copy_from_utf8 in libuna_utf16_string.o
:info:build       _libuna_utf16_string_copy_from_utf8_stream in libuna_utf16_string.o
:info:build       _libuna_utf16_string_copy_from_utf16_stream in libuna_utf16_string.o
:info:build       _libuna_utf16_string_copy_from_utf32 in libuna_utf16_string.o
:info:build       _libuna_utf16_string_copy_from_utf32_stream in libuna_utf16_string.o
:info:build   "_libuna_unicode_character_copy_from_utf16_stream", referenced from:
:info:build       _libuna_utf16_string_size_from_utf16_stream in libuna_utf16_string.o
:info:build       _libuna_utf16_string_copy_from_utf16_stream in libuna_utf16_string.o
:info:build       _libuna_utf32_string_size_from_utf16_stream in libuna_utf32_string.o
:info:build       _libuna_utf32_string_copy_from_utf16_stream in libuna_utf32_string.o
:info:build       _libuna_utf8_string_size_from_utf16_stream in libuna_utf8_string.o
:info:build       _libuna_utf8_string_copy_from_utf16_stream in libuna_utf8_string.o
:info:build   "_libuna_unicode_character_copy_from_utf32_stream", referenced from:
:info:build       _libuna_utf16_string_size_from_utf32_stream in libuna_utf16_string.o
:info:build       _libuna_utf16_string_copy_from_utf32_stream in libuna_utf16_string.o
:info:build       _libuna_utf32_string_size_from_utf32_stream in libuna_utf32_string.o
:info:build       _libuna_utf32_string_copy_from_utf32_stream in libuna_utf32_string.o
:info:build       _libuna_utf8_string_size_from_utf32_stream in libuna_utf8_string.o
:info:build       _libuna_utf8_string_copy_from_utf32_stream in libuna_utf8_string.o
:info:build   "_libuna_unicode_character_size_to_utf32", referenced from:
:info:build       _libuna_utf32_stream_size_from_utf8 in libuna_utf32_stream.o
:info:build       _libuna_utf32_stream_size_from_utf16 in libuna_utf32_stream.o
:info:build       _libuna_utf32_string_size_from_byte_stream in libuna_utf32_string.o
:info:build       _libuna_utf32_string_size_from_utf8 in libuna_utf32_string.o
:info:build       _libuna_utf32_string_size_from_utf8_stream in libuna_utf32_string.o
:info:build       _libuna_utf32_string_size_from_utf16 in libuna_utf32_string.o
:info:build       _libuna_utf32_string_size_from_utf16_stream in libuna_utf32_string.o
:info:build       ...
:info:build   "_libuna_utf32_stream_copy_byte_order_mark", referenced from:
:info:build       _libuna_utf32_stream_copy_to_utf8 in libuna_utf32_stream.o
:info:build       _libuna_utf32_stream_copy_from_utf16 in libuna_utf32_stream.o
:info:build       _libuna_utf32_stream_copy_from_utf32 in libuna_utf32_stream.o
:info:build   "_libuna_unicode_character_copy_to_utf32_stream", referenced from:
:info:build       _libuna_utf32_stream_copy_to_utf8 in libuna_utf32_stream.o
:info:build       _libuna_utf32_stream_copy_from_utf16 in libuna_utf32_stream.o
:info:build   "_libuna_unicode_character_copy_to_utf32", referenced from:
:info:build       _libuna_utf32_string_copy_from_byte_stream in libuna_utf32_string.o
:info:build       _libuna_utf32_string_copy_from_utf8 in libuna_utf32_string.o
:info:build       _libuna_utf32_string_copy_from_utf8_stream in libuna_utf32_string.o
:info:build       _libuna_utf32_string_copy_from_utf16 in libuna_utf32_string.o
:info:build       _libuna_utf32_string_copy_from_utf16_stream in libuna_utf32_string.o
:info:build       _libuna_utf32_string_copy_from_utf32_stream in libuna_utf32_string.o
:info:build   "_libuna_utf8_stream_copy_byte_order_mark", referenced from:
:info:build       _libuna_utf8_stream_copy_from_utf8 in libuna_utf8_stream.o
:info:build       _libuna_utf8_stream_copy_from_utf16 in libuna_utf8_stream.o
:info:build       _libuna_utf8_stream_copy_from_utf32 in libuna_utf8_stream.o
:info:build   "_libuna_unicode_character_size_to_utf8", referenced from:
:info:build       _libuna_utf8_stream_size_from_utf16 in libuna_utf8_stream.o
:info:build       _libuna_utf8_stream_size_from_utf32 in libuna_utf8_stream.o
:info:build       _libuna_utf8_string_size_from_byte_stream in libuna_utf8_string.o
:info:build       _libuna_utf8_string_size_from_utf8_stream in libuna_utf8_string.o
:info:build       _libuna_utf8_string_size_from_utf16 in libuna_utf8_string.o
:info:build       _libuna_utf8_string_size_from_utf16_stream in libuna_utf8_string.o
:info:build       _libuna_utf8_string_size_from_utf32 in libuna_utf8_string.o
:info:build       ...
:info:build   "_libuna_unicode_character_copy_to_utf8", referenced from:
:info:build       _libuna_utf8_stream_copy_from_utf16 in libuna_utf8_stream.o
:info:build       _libuna_utf8_stream_copy_from_utf32 in libuna_utf8_stream.o
:info:build       _libuna_utf8_string_copy_from_byte_stream in libuna_utf8_string.o
:info:build       _libuna_utf8_string_copy_from_utf8_stream in libuna_utf8_string.o
:info:build       _libuna_utf8_string_copy_from_utf16 in libuna_utf8_string.o
:info:build       _libuna_utf8_string_copy_from_utf16_stream in libuna_utf8_string.o
:info:build       _libuna_utf8_string_copy_from_utf32 in libuna_utf8_string.o
:info:build       ...
:info:build ld: symbol(s) not found for architecture x86_64
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)

Attachments (4)

main.log (148.7 KB) - added by mf2k (Frank Schima) 13 years ago.
patch-libuna_inline.h.diff (340 bytes) - added by ranauei@… 13 years ago.
Possible fix to compile with clang
Portfile.diff (2.0 KB) - added by ranauei@… 13 years ago.
Added patch and fixed style and few other things.
Portfile2.diff (1.1 KB) - added by ranauei@… 13 years ago.
Just the minimum changes

Download all attachments as: .zip

Change History (11)

Changed 13 years ago by mf2k (Frank Schima)

Attachment: main.log added

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

I see you're using clang. Have you tried using a different compiler?

Another idea: I see newer alpha and beta versions are available. You could try one of those, and if they work, maybe we can identify what change fixed this problem and backport it to the stable version.

comment:2 Changed 13 years ago by ranauei@…

This seems the same error I had with minidlna. It's about the use of inline wich is interpreted differently between clang (C99) and gcc (GNU89). See here http://clang.llvm.org/compatibility.html#inline I attached a possible fix. If other files trip this error simply proceed in the same manner.

Changed 13 years ago by ranauei@…

Attachment: patch-libuna_inline.h.diff added

Possible fix to compile with clang

comment:3 Changed 13 years ago by ranauei@…

I just tested the port with the patch and it compiles fine with clang. Since I was there I fixed other things in the Portfile. Mainly the style wich was in a really bad shape, also I moved checksums to sha256/rmd160 and fixed master_sites (the strange thing with the certificate and removed the other url, I think sourceforge is enough).

Changed 13 years ago by ranauei@…

Attachment: Portfile.diff added

Added patch and fixed style and few other things.

comment:4 Changed 13 years ago by ranauei@…

Cc: ranauei@… added

Cc Me!

Changed 13 years ago by ranauei@…

Attachment: Portfile2.diff added

Just the minimum changes

comment:5 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Keywords: clang haspatch added
Summary: libewf build errorlibewf build error with clang

Thank you for attaching a minimal patch; we don't want to mix whitespace changes with other changes.

Why increase the port's revision? This won't change the files that get installed by the port, will it? People using clang won't have been able to install it before at all, and people not using clang would get exactly the same files as before.

comment:6 in reply to:  5 Changed 13 years ago by ranauei@…

Replying to ryandesign@…:

Why increase the port's revision? This won't change the files that get installed by the port, will it? People using clang won't have been able to install it before at all, and people not using clang would get exactly the same files as before.

Because I think there is the slightly chance that someone installed this port anyway manually modifying it, for example forcing another compiler, without filing a ticket.

comment:7 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

Maintainer timeout.

  • r88471: fixed build with clang
  • r88472: removed broken uitwisselplatform.nl master_sites entry
  • r88473: removed code that does nothing
Note: See TracTickets for help on using tickets.