Opened 11 years ago

Closed 6 years ago

#42785 closed defect (duplicate)

db46: error: no member named 'seq' in 'struct __db'

Reported by: zoleg@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: blair (Blair Zajac), mp@…, chrstphrchvz (Christopher Chavez)
Port: db46

Description

installed: db46_4.6.21_8+java+tcl

sudo port -vs upgrade db46

....

/usr/bin/clang -c -pipe -Os -arch x86_64 -I/opt/local/var/macports/build/_opt_mports_trunk_dports_databases_db46/db46/work/db-4.6.21/dist/.. -I/opt/local/include /opt/l
ocal/var/macports/build/_opt_mports_trunk_dports_databases_db46/db46/work/db-4.6.21/dist/../db_dump185/db_dump185.c  -fno-common -DPIC -o .libs/db_dump185.o
/opt/local/var/macports/build/_opt_mports_trunk_dports_databases_db46/db46/work/db-4.6.21/dist/../db_dump185/db_dump185.c:211:13: warning: implicit declaration of function 'dbopen' is invalid in C99 [-Wimplicit-function-declaration]
        if ((dbp = dbopen(argv[0], O_RDONLY, 0, DB_BTREE, NULL)) == NULL) {
                   ^
/opt/local/var/macports/build/_opt_mports_trunk_dports_databases_db46/db46/work/db-4.6.21/dist/../db_dump185/db_dump185.c:211:11: warning: incompatible integer to pointer conversion assigning to 'DB *' (aka 'struct __db *') from 'int' [-Wint-conversion]
        if ((dbp = dbopen(argv[0], O_RDONLY, 0, DB_BTREE, NULL)) == NULL) {
                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_mports_trunk_dports_databases_db46/db46/work/db-4.6.21/dist/../db_dump185/db_dump185.c:212:12: warning: incompatible integer to pointer conversion assigning to 'DB *' (aka 'struct __db *') from 'int' [-Wint-conversion]
                if ((dbp =
                         ^
/opt/local/var/macports/build/_opt_mports_trunk_dports_databases_db46/db46/work/db-4.6.21/dist/../db_dump185/db_dump185.c:228:24: error: no member named 'seq' in 'struct __db'
                while (!(rval = dbp->seq(dbp, &key, &data, R_NEXT))) {
                                ~~~  ^

Attachments (2)

main.log (313.0 KB) - added by zoleg@… 11 years ago.
db46-42785-patch.diff (596 bytes) - added by mp@… 10 years ago.
Portfile diff that allows build of db46 on Mavericks

Download all attachments as: .zip

Change History (12)

Changed 11 years ago by zoleg@…

Attachment: main.log added

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

Cc: blair@… added
Resolution: invalid
Status: newclosed
Summary: db46 upgrade failure on Mavericsdb46: error: no member named 'seq' in 'struct __db'

You presumably have a rogue copy of readline installed in /usr/local; please remove it. See comment:ticket:12040:4. We don't support having software installed in /usr/local when using MacPorts.

comment:2 Changed 11 years ago by zoleg@…

no includes or libraries in /usr/local:

bash-3.2$ ls -la /usr/local
total 72
drwxrwxr-x  11 root   admin    374 10 мар 12:23 .
drwxr-xr-x@ 12 root   wheel    408 26 окт 00:33 ..
drwxr-xr-x  13 zoleg  admin    442 15 дек 13:04 .git
-rw-r--r--   1 zoleg  admin    213 15 дек 13:03 .gitignore
-rw-r--r--   1 zoleg  admin    505 15 дек 13:03 CONTRIBUTING.md
drwxr-xr-x   8 zoleg  admin    272 15 дек 13:03 Library.hb
-rw-r--r--   1 zoleg  admin    940 15 дек 13:03 README.md
-rw-r--r--   1 zoleg  admin  23510 15 дек 13:03 SUPPORTERS.md
drwxrwxr-x   7 root   admin    238 15 дек 13:03 bin
drwxr-xr-x   3 root   wheel    102 25 окт 23:12 man
drwxr-xr-x   3 zoleg  admin    102 15 дек 13:03 share
bash-3.2$

comment:3 Changed 11 years ago by zoleg@…

Resolution: invalid
Status: closedreopened

comment:4 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Please try moving /usr/local aside (e.g. renaming it to /usr/local-off), then clean db46 and try again.

comment:5 Changed 10 years ago by mp@…

Cc: mp@… added

Cc Me!

comment:6 Changed 10 years ago by mp@…

Same problem on Mavericks here. (After upgrading from Snow Leopard, the rebuild of db46 failed with this error, and almost every time I have installed or upgraded something in MacPorts it has been trying to upgrade db46 and failing.)

Removing

--enable-dump185

from configure.args solves the issue.

Some details:

Discovered that a /usr/include/db.h got installed by the OSX 10.9 SDK,

-r--r--r--  1 root  wheel  7897 May 27 11:45:17 2014 /usr/include/db.h

May 27 11:45:03 installd[1472]: PackageKit: Extracting file://localhost/Volumes/Command%20Line%20Developer%20Tools/Packages/CLTools_Executables.pkg   
May 27 11:45:13 installd[1472]: PackageKit: Extracting file://localhost/Volumes/Command%20Line%20Developer%20Tools/Packages/MacOSX10_9_SDK.pkg
May 27 11:45:25 installd[1472]: PackageKit: update_dyld_shared_cache -overlay /var/folders/...

but that is not causing this problem with the db46 build. (It might have been there before the Mavericks upgrade too.) Also moved /usr/local aside by renaming it when trying to build, just to make sure nothing there interferes.

The compat185 variant also builds without the --enable-dump185, but building it by adding --enable-dump185 with

variant compat185 description {build with db185 compatibility mode} {
       configure.args-append   --enable-compat185 --enable-dump185

fails as originally.

Trying to access databases that are reported to be "Berkeley DB 1.85" with the compat185 variant built without --enable-dump185 doesn't work. db46_verify /etc/aliases.db fails for example. It is not clear to me how this is supposed to behave, though.

db46 @4.6.21_9+compat185+universal (active) platform='darwin 13' archs='i386 x86_64'

built without --enable-dump185:

# /usr/bin/file /etc/aliases.db 
/etc/aliases.db: Berkeley DB 1.85 (Hash, version 2, big-endian)

# db46_verify /etc/aliases.db
db46_verify: /private/etc/aliases.db: unexpected file type or format
db46_verify: Page 0: metadata page corrupted
db46_verify: Page 0: pgno incorrectly set to 3775922176
db46_verify: Page 0: bad magic number 4096
db46_verify: mmap: Invalid argument
db46_verify: /private/etc/aliases.db: DB_VERIFY_BAD: Database verification failed

Changed 10 years ago by mp@…

Attachment: db46-42785-patch.diff added

Portfile diff that allows build of db46 on Mavericks

comment:7 Changed 9 years ago by ajdudman

I never installled readline in /usr/local. I got the same problem on Yosemite. I had port db_select installed and db46 selected. Then I ran

port select db none
port -suv upgrade db46

and I succeeded.

Version 0, edited 9 years ago by ajdudman (next)

comment:8 Changed 6 years ago by chrstphrchvz (Christopher Chavez)

Could this have been the same issue as #47921?

comment:9 Changed 6 years ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added

comment:10 Changed 6 years ago by jmroot (Joshua Root)

Resolution: duplicate
Status: reopenedclosed

Probably; reopen if not.

Note: See TracTickets for help on using tickets.