Forums : The Ohcount Project

Dear Open Hub Users,

We’re excited to announce that we will be moving the Open Hub Forum to https://community.synopsys.com/s/black-duck-open-hub. Beginning immediately, users can head over, register, get technical help and discuss issue pertinent to the Open Hub. Registered users can also subscribe to Open Hub announcements here.


On May 1, 2020, we will be freezing https://www.openhub.net/forums and users will not be able to create new discussions. If you have any questions and concerns, please email us at [email protected]

errors compling and running on mac os x 10.6 snow leopard

I downloaded ohcount3.0.0.rc.tar.gz and ran into a compile issue with the tests:

In file included from test/unit/alltests.c:10:
test/unit/sourcefile
test.h:62: error: redefinition of ‘testsourcefilediff’
test/unit/sourcefiletest.h:38: error: previous definition of ‘testsourcefile_diff’ was here

I commented out the code at line 62 and got it to compile, but now I get a trap error when I try to run the tests or run ohcount itself:

Process: ohcount [78519]
Path: /Users/jbriggs/Applications/ohcount/bin/ohcount
Identifier: ohcount
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: bash [3981]

Date/Time: 2009-10-11 22:20:25.843 -0500
OS Version: Mac OS X 10.6.1 (10B504)
Report Version: 6

Interval Since Last Report: 1369560 sec
Crashes Since Last Report: 7
Per-App Crashes Since Last Report: 4
Anonymous UUID: 6AFD9CB5-28F3-49A3-8057-9AB2B6106F6C

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Application Specific Information:
__abort() called

Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libSystem.B.dylib 0x9559a912 _kill + 10
1 libSystem.B.dylib 0x9559a904 kill$UNIX2003 + 32
2 libSystem.B.dylib 0x9562db99 raise + 26
3 libSystem.B.dylib 0x95643be5 _
abort + 124
4 libSystem.B.dylib 0x95626928 releasefilestreamsfortask + 0
5 ohcount 0x0000565a ohcountdetectlanguage + 2144 (detector.c:153)
6 ohcount 0x00002b64 ohcountsourcefilegetlanguage + 25 (sourcefile.c:118)
7 ohcount 0x000246c7 ohcount
parse + 23 (parser.c:13)
8 ohcount 0x000027f3 ohcountsourcefileparse + 44 (sourcefile.c:192)
9 ohcount 0x00002952 ohcountsourcefilegetloclist + 35 (sourcefile.c:199)
10 ohcount 0x000029c8 ohcountsourcefilelistanalyzelanguages + 30 (sourcefile.c:447)
11 ohcount 0x00001cf0 summary + 56 (ohcount.c:210)
12 ohcount 0x00002565 main + 542 (ohcount.c:302)
13 ohcount 0x00001c1d start + 53

Thread 0 crashed with X86 Thread State (32-bit):
eax: 0x00000000 ebx: 0x95643b75 ecx: 0xbffff4bc edx: 0x9559a912
edi: 0x00000076 esi: 0x00000000 ebp: 0xbffff4d8 esp: 0xbffff4bc
ss: 0x0000001f efl: 0x00000286 eip: 0x9559a912 cs: 0x00000007
ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037
cr2: 0xffe178e0

Binary Images:
0x1000 - 0xc6ff7 +ohcount ??? (???) /Users/jbriggs/Applications/ohcount/bin/ohcount
0xe9000 - 0x116fe7 +libpcre.0.dylib ??? (???) /opt/local/lib/libpcre.0.dylib
0x8fe00000 - 0x8fe4162b dyld 132.1 (???) /usr/lib/dyld
0x95539000 - 0x956ddfeb libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib
0x9823c000 - 0x9823ffe7 libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib
0xffff0000 - 0xffff1fff libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib

Model: MacBookPro1,1, BootROM MBP11.0055.B08, 2 processors, Intel Core Duo, 2 GHz, 2 GB, SMC 1.2f10
Graphics: ATI Radeon X1600, ATY,RadeonX1600, PCIe, 256 MB
Memory Module: globalname
AirPort: spairport
wirelesscardtypeairportextreme (0x168C, 0x86), Atheros 5424: 2.0.19.4
Bluetooth: Version 2.2.1f7, 2 service, 1 devices, 1 incoming serial ports
Network Service: AirPort, AirPort, en1
Serial ATA Device: FUJITSU MHV2100BH, 93.16 GB
Parallel ATA Device: MATSHITADVD-R UJ-857
USB Device: Built-in iSight, 0x05ac (Apple Inc.), 0x8501, 0xfd400000
USB Device: Apple Internal Keyboard / Trackpad, 0x05ac (Apple Inc.), 0x0217, 0x1d200000
USB Device: Bluetooth USB Host Controller, 0x05ac (Apple Inc.), 0x8205, 0x7d100000
USB Device: IR Receiver, 0x05ac (Apple Inc.), 0x8240, 0x5d200000

josephgbriggs almost 15 years ago
 

Hi joseph,

Sorry for the problem.

Please grab the more recent tarball and if you still have problems, create a support ticket. Thanks.

If it's hard to create a ticket, please let me know why so I can make it easier and post your findings with the build here.

Thanks again.

Andy Verprauskus almost 15 years ago
 

Thanks, Andy. Compile error fixed, but still failing tests. Ticket #48 created.

josephgbriggs almost 15 years ago
 

Sorry it took a while to get to and thanks for the new report.

I couldn't reproduce this on my MAC but the backtrace strongly suggested a potential fix which I pushed to sourceforge. Please try it and let me know if it didn't fix your crash.

Andy Verprauskus almost 15 years ago
 

Andy,

No dice :( Reopened with details about my toolchain and new stacktrace.

Let me know if there is anything else you would like for me to try.

josephgbriggs almost 15 years ago
 

Anyone else have any suggestions of things I can try? Can someone send me a binary?

josephgbriggs almost 15 years ago
 

Bump...

I am willing to try to debug this issue, however I am not familiar enough with the mac software stack to know where to start. Any hints from anyone?

josephgbriggs almost 15 years ago
 

I got a new mac and am able to compile ohcount fine.

Installing the Mac OS X developer tools on my new computer made think of a possibility for why I was having issues previously: as part of the install process, the installer has an optional 10.4 support install. I may have not done that on my previous computer and may have caused issues if ohcount is dependent on some dynamic libraries that were modified since 10.4.

josephgbriggs about 14 years ago