Ticket #33219 (closed defect: fixed)
testdisk @6.13 - Build fails using clang
| Reported by: | larry.velazquez@… | Owned by: | snc@… |
|---|---|---|---|
| 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
Change History
Changed 16 months ago by larry.velazquez@…
- Attachment testdisk-main.log added
comment:1 Changed 16 months ago by larry.velazquez@…
Never mind, sudo port install testdisk configure.compiler=llvm-gcc-4.2 just worked for me. Not sure what happened before.
comment:2 follow-up: ↓ 4 Changed 16 months ago by snc@…
Did you clean between the normal install and when you manually set the compiler?
comment:3 Changed 16 months ago by ryandesign@…
- Cc snc@… removed
- Keywords clang added
- Owner changed from macports-tickets@… to snc@…
comment:4 in reply to: ↑ 2 Changed 16 months ago by larry.velazquez@…
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.


main.log after compiling default