Opened 12 years ago

Closed 12 years ago

#33219 closed defect (fixed)

testdisk @6.13 - Build fails using clang

Reported by: larryv (Lawrence Velázquez) Owned by: nerdling (Jeremy Lavergne)
Priority: Normal Milestone:
Component: ports Version:
Keywords: clang Cc:
Port: testdisk

Description

Building testdisk fails for me when clang is used as the compiler:

:info:build Undefined symbols for architecture x86_64:
:info:build   "_ext2fs_mark_generic_bitmap", referenced from:
:info:build       _ext2fs_mark_block_bitmap in ext2_dir.o
:info:build       _ext2fs_mark_inode_bitmap in ext2_dir.o
:info:build       _ext2fs_fast_mark_block_bitmap in ext2_dir.o
:info:build       _ext2fs_fast_mark_inode_bitmap in ext2_dir.o
:info:build   "_ext2fs_unmark_generic_bitmap", referenced from:
:info:build       _ext2fs_unmark_block_bitmap in ext2_dir.o
:info:build       _ext2fs_unmark_inode_bitmap in ext2_dir.o
:info:build       _ext2fs_fast_unmark_block_bitmap in ext2_dir.o
:info:build       _ext2fs_fast_unmark_inode_bitmap in ext2_dir.o
:info:build   "_ext2fs_test_generic_bitmap", referenced from:
:info:build       _ext2fs_test_block_bitmap in ext2_dir.o
:info:build       _ext2fs_test_inode_bitmap in ext2_dir.o
:info:build       _ext2fs_fast_test_block_bitmap in ext2_dir.o
:info:build       _ext2fs_fast_test_inode_bitmap in ext2_dir.o
:info:build   "_ext2fs_get_generic_bitmap_start", referenced from:
:info:build       _ext2fs_get_block_bitmap_start in ext2_dir.o
:info:build       _ext2fs_get_inode_bitmap_start in ext2_dir.o
:info:build   "_ext2fs_get_generic_bitmap_end", referenced from:
:info:build       _ext2fs_get_block_bitmap_end in ext2_dir.o
:info:build       _ext2fs_get_inode_bitmap_end in ext2_dir.o
:info:build   "_ext2fs_test_block_bitmap_range", referenced from:
:info:build       _ext2fs_fast_test_block_bitmap_range in ext2_dir.o
:info:build   "_ext2fs_mark_block_bitmap_range", referenced from:
:info:build       _ext2fs_fast_mark_block_bitmap_range in ext2_dir.o
:info:build   "_ext2fs_unmark_block_bitmap_range", referenced from:
:info:build       _ext2fs_fast_unmark_block_bitmap_range in ext2_dir.o
: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)

However, sudo port install testdisk configure.compiler=llvm-gcc-4.2 seems to make no difference; it still uses clang as the compiler. Manually adding "configure.compiler llvm-gcc-4.2" to the Portfile does fix the problem for me. I'm not sure why this is.

Mac OS X 10.7.2 (11C74), Xcode 4.2.1 (4D502), MacPorts 2.0.3.

Attachments (1)

testdisk-main.log (807.3 KB) - added by larryv (Lawrence Velázquez) 12 years ago.
main.log after compiling default

Download all attachments as: .zip

Change History (7)

Changed 12 years ago by larryv (Lawrence Velázquez)

Attachment: testdisk-main.log added

main.log after compiling default

comment:1 Changed 12 years ago by larryv (Lawrence Velázquez)

Never mind, sudo port install testdisk configure.compiler=llvm-gcc-4.2 just worked for me. Not sure what happened before.

comment:2 Changed 12 years ago by nerdling (Jeremy Lavergne)

Did you clean between the normal install and when you manually set the compiler?

comment:3 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: snc@… removed
Keywords: clang added
Owner: changed from macports-tickets@… to snc@…

comment:4 in reply to:  2 Changed 12 years ago by larryv (Lawrence Velázquez)

Replying to snc@…:

Did you clean between the normal install and when you manually set the compiler?

I think I neglected to do so when I wrote the ticket. So now testdisk installs fine with llvm-gcc, but not with clang.

comment:5 Changed 12 years ago by nerdling (Jeremy Lavergne)

Status: newassigned
Version: 2.0.3

Thanks, we're now avoiding clang: r90097.

comment:6 Changed 12 years ago by nerdling (Jeremy Lavergne)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.