Opened 15 years ago

Closed 14 months ago

#20849 closed defect (worksforme)

Cannot install db46 on Mac OS X 10.5.8

Reported by: jmlinhart@… Owned by:
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: Cc: jpocom@…, flobakk@…, frederick.c.lee@…, axet (Alexey Kuznetsov), philipp.staender@…, jeremy@…, pierluigivinciguerra@…, ryandesign (Ryan Carsten Schmidt), xaymaca@…
Port: db46

Description (last modified by blb@…)

macbook:~ jml$ sudo port clean db46
--->  Cleaning db46
macbook:~ jml$ sudp port install db46
-bash: sudp: command not found
macbook:~ jml$ sudo port install db46
--->  Fetching db46
--->  Verifying checksum(s) for db46
--->  Extracting db46
--->  Applying patches to db46
--->  Configuring db46
--->  Building db46
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_db46/work/db-4.6.21/build_unix" && make all " returned error 2
Command output: ../dist/../libdb_java/db_java_wrap.c:10010: error: syntax error before 'void'
../dist/../libdb_java/db_java_wrap.c:10010: error: syntax error before '*' token
../dist/../libdb_java/db_java_wrap.c: In function 'Java_com_sleepycat_db_internal_db_1javaJNI_DbTxn_1prepare':
../dist/../libdb_java/db_java_wrap.c:10015: error: 'jenv' undeclared (first use in this function)
../dist/../libdb_java/db_java_wrap.c:10016: error: 'jcls' undeclared (first use in this function)
../dist/../libdb_java/db_java_wrap.c:10017: error: 'jarg1' undeclared (first use in this function)
../dist/../libdb_java/db_java_wrap.c:10019: error: 'jarg2' undeclared (first use in this function)
../dist/../libdb_java/db_java_wrap.c:10030: error: 'jobject' undeclared (first use in this function)
../dist/../libdb_java/db_java_wrap.c:10041: error: 'jbyte' undeclared (first use in this function)
../dist/../libdb_java/db_java_wrap.c:10041: error: syntax error before ')' token
../dist/../libdb_java/db_java_wrap.c: At top level:
../dist/../libdb_java/db_java_wrap.c:10046: error: syntax error before 'void'
../dist/../libdb_java/db_java_wrap.c:10046: error: syntax error before '*' token
../dist/../libdb_java/db_java_wrap.c: In function 'Java_com_sleepycat_db_internal_db_1javaJNI_DbTxn_1set_1timeout':
../dist/../libdb_java/db_java_wrap.c:10052: error: 'jenv' undeclared (first use in this function)
../dist/../libdb_java/db_java_wrap.c:10053: error: 'jcls' undeclared (first use in this function)
../dist/../libdb_java/db_java_wrap.c:10054: error: 'jarg1' undeclared (first use in this function)
../dist/../libdb_java/db_java_wrap.c:10055: error: 'jarg2' undeclared (first use in this function)
../dist/../libdb_java/db_java_wrap.c:10056: error: 'jarg3' undeclared (first use in this function)
../dist/../libdb_java/db_java_wrap.c:10065: error: 'jobject' undeclared (first use in this function)
../dist/../libdb_java/db_java_wrap.c: At top level:
../dist/../libdb_java/db_java_wrap.c:10071: error: syntax error before 'void'
../dist/../libdb_java/db_java_wrap.c:10071: error: syntax error before '*' token
../dist/../libdb_java/db_java_wrap.c: In function 'Java_com_sleepycat_db_internal_db_1javaJNI_DbTxn_1set_1name':
../dist/../libdb_java/db_java_wrap.c:10076: error: 'jenv' undeclared (first use in this function)
../dist/../libdb_java/db_java_wrap.c:10077: error: 'jcls' undeclared (first use in this function)
../dist/../libdb_java/db_java_wrap.c:10078: error: 'jarg1' undeclared (first use in this function)
../dist/../libdb_java/db_java_wrap.c:10080: error: 'jarg2' undeclared (first use in this function)
../dist/../libdb_java/db_java_wrap.c:10092: error: 'jobject' undeclared (first use in this function)
make: *** [db_java_wrap.lo] Error 1

Error: Status 1 encountered during processing.

Change History (21)

comment:1 Changed 15 years ago by blb@…

Description: modified (diff)
Owner: changed from macports-tickets@… to blair@…
Port: db46 added
Priority: HighNormal

10.5.8 on an Intel- or PowerPC-based Mac? Also, what is the version of Xcode you have installed?

comment:2 Changed 15 years ago by blair (Blair Zajac)

Do you have anything installed in /usr/local? If so, rename /usr/local and try the recompile again.

Which version of Java do you have your system set up to use?

BTW, this works for my on all my 10.4.x and 10.5.x systems.

Regards, Blair

comment:3 Changed 15 years ago by flobakk@…

I have the exact same problem.

Tried Java SE 6 64-bits and Java 5 32-bits, specified in Java Preferences.

java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03-211)
Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02-83, mixed mode)

and:

java version "1.5.0_19"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02-304)
Java HotSpot(TM) Client VM (build 1.5.0_19-137, mixed mode, sharing)

Tried to rename /usr/local and do port clean db46, then port install db46 -> same result. Also did a port selfupdate.

comment:4 Changed 15 years ago by jmlinhart@…

I got past my db46 issue:

I went into the directory for db46 and did a manual configure and build. The problem here is that the port is not cd-ing into the correct directory to do the configure, and then when the build is attempted there are numerous failures.

Then I installed doing the port steps step-by-step from there.

I'm still stalled out on installing gimp. I forget where I am failing now, but I get one issue solved, and the next one rears its ugly head. :( I did move /usr/local to /usr/local2 before trying the install. I have a lot of "stuff" installed ... TeX, for example is in /usr/local.

comment:5 Changed 15 years ago by jpocom@…

Hi I don't know if it's the correct way. But I've solve this problem modifying the CPPFLAGS varible in the Makefile. Before CPPFLAGS= -I$(builddir) -I$(srcdir) -I/opt/local/include After CPPFLAGS= -I$(builddir) -I$(srcdir) -I/opt/local/include -I/System/Library/Frameworks/JavaVM.framework/Headers

comment:6 Changed 15 years ago by flobakk@…

Tried the solution offered by jpocom, and it worked flawlessly :) Specifically, the file to edit is (if I remember correctly):

/opt/local/var/macports/build/<db46-download-dir>/work/build_unix/Makefile

comment:7 Changed 15 years ago by frederick.c.lee@…

[/Users/Ric]sudo port
MacPorts 1.8.0
Entering interactive mode... ("help" for help, "quit" to quit)
[Users/Ric] > install db46
--->  Computing dependencies for db46
--->  Building db46
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_db46/work/db-4.6.21/build_unix" && /usr/bin/make -j2 all " returned error 2
Command output: Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
...
...
./dist/../db_dump185/db_dump185.c: In function 'main':
../dist/../db_dump185/db_dump185.c:211: warning: assignment makes pointer from integer without a cast
../dist/../db_dump185/db_dump185.c:213: warning: assignment makes pointer from integer without a cast
...
...
Error: Status 1 encountered during processing.
Goodbye


I attempted to change the CPPFLAGS per previous suggestion:

CPPFLAGS=	-I$(builddir) -I$(srcdir) -I/opt/local/include -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers   

To:

CPPFLAGS=	-I$(builddir) -I$(srcdir) -I/opt/local/include -I/System/Library/Frameworks/JavaVM.framework/Headers   

Tried again...

[Users/Ric] > install db46
--->  Computing dependencies for db46
--->  Building db46
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_db46/work/db-4.6.21/build_unix" && /usr/bin/make -j2 all " returned error 2

Again. A brick wall.

comment:8 Changed 14 years ago by axet (Alexey Kuznetsov)

same here for 10.6.3/1.9.1 !

comment:9 Changed 14 years ago by philipp.staender@…

hi, after > 1 hour of trying some ways i just reinstalled the current XCode SDK (the same version which was already installed), fixed permissions with DiskUtiliy and reinstalled db46 with clean & install --> and it works! :)

comment:10 in reply to:  9 ; Changed 13 years ago by jeremy@…

10.6.4/1.9.1 I have reinstalled the SDK and fixed the permissions. Still a no go. Seems that after fixing the permissions the java still has permission problems. Apple has a knowledge base on this. Seems that they say to ignore this as it will not affect anything else.

http://discussions.info.apple.com/thread.jspa;jsessionid=B39FB5E71C078A30B21A9FD6299CCF94.node0?messageID=11655398&#11655398

I am at a stand still. How do we build manually?

comment:11 in reply to:  10 Changed 13 years ago by jeremy@…

Sorry the kb discussion is here

http://support.apple.com/kb/TS1448

comment:12 Changed 13 years ago by jmroot (Joshua Root)

It's worth noting that nobody has ever attached a complete log to this ticket. The original reporter's error looks like maybe jni.h is missing, which means at least part of the Java developer package is not installed. If I was in Blair's place I would have closed this as worksforme long ago, TBH.

comment:13 Changed 13 years ago by pierluigivinciguerra@…

About the first issue, the missing jni.h file missing:

1) from command line execute /usr/libexec/java_home to get your $JAVA_HOME directory 2) enter in your JAVA_HOME/include 3) check if the jni.h is there. If not, download the JAVA SDK and then retry from the beginning the installation 4) If yes, copy this file (i copied all the .h file to be honest) in /usr/include/

Now it should work, for me it was so. The problem is caused by the missing jni.h file, the program executed by the macport installation seems to look for this file not in the JAVA_HOME/include but only in /usr/include

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

Cc: jpocom@… flobakk@… frederick.c.lee@… ak@… philipp.staender@… jeremy@… pierluigivinciguerra@… ryandesign@… added

Is anybody on this ticket still experiencing this problem? If so, please clean and try again and if it fails again please attach the main.log.

sudo port clean --all db46
sudo port install db46

comment:15 Changed 13 years ago by xaymaca@…

I just encountered this issue. 10.6.7 java 1.6.0_24 64bit. Where do I attach the log?

comment:16 in reply to:  15 ; Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: xaymaca@… added

Replying to xaymaca@…:

I just encountered this issue. 10.6.7 java 1.6.0_24 64bit. Where do I attach the log?

Click the "Attach file" button near the top of this ticket. But first see if your log matches what's already reported in #29115.

comment:17 in reply to:  16 ; Changed 13 years ago by andrey.yanis@…

here's how i fixed it on 10.6.7: JAVA_HOME/include/jni.h - was actually a blank directory (!) not a file. So I deleted this directory and copied jni.h over from SDK 1.6 then regular port install db46 just worked

comment:18 in reply to:  17 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to andrey.yanis@…:

JAVA_HOME/include/jni.h - was actually a blank directory (!) not a file.

I changed the ports to check for this in r78784.

comment:19 Changed 9 years ago by jmroot (Joshua Root)

Surely if this applies to anything anymore it would be to db46-java, not db46?

comment:20 Changed 5 years ago by mf2k (Frank Schima)

Owner: blair deleted
Status: newassigned

comment:21 Changed 14 months ago by jmroot (Joshua Root)

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