Opened 14 years ago

Closed 14 years ago

Last modified 3 years ago

#25708 closed defect (worksforme)

libarchive variants and configure args fails to compile...breaks others

Reported by: hackdefendr (HackDefendr) Owned by: tobypeterson
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc:
Port: libarchive

Description

FYI - toby is the listed maintainer, no email domain listed under "port info libarchive"

  1. Why is --without-lzma a default configure.arg when there is a variant to disable it?
  1. Why are there not more variants to disable things that aren't needed (i.e. bsdtar, bsdcpio)?
  1. Here is the crash that occurs every attempt (debug version attached):
/usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I.  -I./libarchive -I./libarchive_fe   -I/opt/local/include -I/opt/local/include/libxml2  -pipe -O2 -arch x86_64 -MT tar/bsdtar-write.o -MD -MP -MF tar/.deps/bsdtar-write.Tpo -c -o tar/bsdtar-write.o `test -f 'tar/write.c' || echo './'`tar/write.c
tar/tree.c:126: error: expected specifier-qualifier-list before 'HANDLE'
tar/tree.c: In function 'tree_dump':
tar/tree.c:183: error: 'struct tree' has no member named 'depth'
tar/tree.c:184: error: 'struct tree' has no member named 'buff'
tar/tree.c:186: error: 'struct tree' has no member named 'basename'
tar/tree.c:198: error: 'struct tree' has no member named 'd'
tar/tree.c: In function 'tree_push':
tar/tree.c:226: error: 'struct tree' has no member named 'dirname_length'
tar/tree.c: In function 'tree_append':
tar/tree.c:238: error: 'struct tree' has no member named 'buff'
tar/tree.c:239: error: 'struct tree' has no member named 'buff'
tar/tree.c:239: error: 'struct tree' has no member named 'dirname_length'
tar/tree.c:245: error: 'struct tree' has no member named 'dirname_length'
tar/tree.c:246: error: 'struct tree' has no member named 'buff_length'
tar/tree.c:247: error: 'struct tree' has no member named 'buff_length'
tar/tree.c:248: error: 'struct tree' has no member named 'buff_length'
tar/tree.c:249: error: 'struct tree' has no member named 'buff_length'
tar/tree.c:250: error: 'struct tree' has no member named 'buff_length'
tar/tree.c:251: error: 'struct tree' has no member named 'buff'
tar/tree.c:251: error: 'struct tree' has no member named 'buff'
tar/tree.c:251: error: 'struct tree' has no member named 'buff_length'
tar/tree.c:253: error: 'struct tree' has no member named 'buff'
tar/tree.c:255: error: 'struct tree' has no member named 'buff'
tar/tree.c:255: error: 'struct tree' has no member named 'dirname_length'
tar/tree.c:256: error: 'struct tree' has no member named 'path_length'
tar/tree.c:256: error: 'struct tree' has no member named 'dirname_length'
tar/tree.c:258: error: 'struct tree' has no member named 'dirname_length'
tar/tree.c:260: error: 'struct tree' has no member named 'path_length'
tar/tree.c:268: error: 'struct tree' has no member named 'basename'
tar/tree.c: In function 'tree_open':
tar/tree.c:286: error: 'struct tree' has no member named 'openCount'
tar/tree.c:287: error: 'struct tree' has no member named 'd'
tar/tree.c:287: error: 'INVALID_HANDLE_VALUE' undeclared (first use in this function)
tar/tree.c:287: error: (Each undeclared identifier is reported only once
tar/tree.c:287: error: for each function it appears in.)
tar/tree.c: In function 'tree_ascend':
tar/tree.c:338: error: 'struct tree' has no member named 'depth'
tar/tree.c:342: error: 'struct tree' has no member named 'tree_errno'
tar/tree.c:354: error: 'struct tree' has no member named 'openCount'
tar/tree.c:361: error: 'struct tree' has no member named 'tree_errno'
tar/tree.c: In function 'tree_pop':
tar/tree.c:376: error: 'struct tree' has no member named 'buff'
tar/tree.c:377: error: 'struct tree' has no member named 'buff'
tar/tree.c:377: error: 'struct tree' has no member named 'dirname_length'
tar/tree.c:382: error: 'struct tree' has no member named 'dirname_length'
tar/tree.c:383: error: 'struct tree' has no member named 'buff'
tar/tree.c:384: error: 'struct tree' has no member named 'basename'
tar/tree.c:384: error: 'struct tree' has no member named 'buff'
tar/tree.c:384: error: 'struct tree' has no member named 'dirname_length'
tar/tree.c:385: error: 'struct tree' has no member named 'basename'
tar/tree.c:386: error: 'struct tree' has no member named 'basename'
tar/tree.c: In function 'tree_next':
tar/tree.c:402: error: 'struct tree' has no member named 'visit_type'
tar/tree.c:410: error: 'struct tree' has no member named 'd'
tar/tree.c:410: error: 'INVALID_HANDLE_VALUE' undeclared (first use in this function)
tar/tree.c:439: error: 'struct tree' has no member named 'visit_type'
tar/tree.c:449: error: 'struct tree' has no member named 'openCount'
tar/tree.c:450: error: 'struct tree' has no member named 'openCount'
tar/tree.c:450: error: 'struct tree' has no member named 'maxOpenCount'
tar/tree.c:451: error: 'struct tree' has no member named 'maxOpenCount'
tar/tree.c:451: error: 'struct tree' has no member named 'openCount'
tar/tree.c:456: error: 'struct tree' has no member named 'dirname_length'
tar/tree.c:456: error: 'struct tree' has no member named 'path_length'
tar/tree.c:465: error: 'struct tree' has no member named 'tree_errno'
tar/tree.c:466: error: 'struct tree' has no member named 'visit_type'
tar/tree.c:468: error: 'struct tree' has no member named 'depth'
tar/tree.c:469: error: 'struct tree' has no member named 'visit_type'
tar/tree.c:484: error: 'struct tree' has no member named 'visit_type'
tar/tree.c:485: error: 'struct tree' has no member named 'visit_type'
tar/tree.c:489: error: 'struct tree' has no member named 'flags'
tar/tree.c:490: error: 'struct tree' has no member named 'flags'
tar/tree.c:493: error: 'struct tree' has no member named 'visit_type'
tar/tree.c: In function 'tree_dir_next_posix':
tar/tree.c:542: error: 'struct tree' has no member named 'd'
tar/tree.c:543: error: 'struct tree' has no member named 'd'
tar/tree.c:546: error: 'struct tree' has no member named 'tree_errno'
tar/tree.c:547: error: 'struct tree' has no member named 'visit_type'
tar/tree.c:548: error: 'struct tree' has no member named 'visit_type'
tar/tree.c:552: error: 'struct tree' has no member named 'de'
tar/tree.c:552: error: 'struct tree' has no member named 'd'
tar/tree.c:553: error: 'struct tree' has no member named 'de'
tar/tree.c:554: error: 'struct tree' has no member named 'd'
tar/tree.c:555: error: 'struct tree' has no member named 'd'
tar/tree.c:555: error: 'INVALID_HANDLE_VALUE' undeclared (first use in this function)
tar/tree.c:558: error: 'struct tree' has no member named 'de'
tar/tree.c:559: error: 'struct tree' has no member named 'de'
tar/tree.c:560: error: 'struct tree' has no member named 'flags'
tar/tree.c:561: error: 'struct tree' has no member named 'flags'
tar/tree.c:567: error: 'struct tree' has no member named 'visit_type'
tar/tree.c: In function 'tree_errno':
tar/tree.c:578: error: 'struct tree' has no member named 'tree_errno'
tar/tree.c: In function 'tree_descend':
tar/tree.c:588: error: 'struct tree' has no member named 'visit_type'
tar/tree.c:592: error: 'struct tree' has no member named 'basename'
tar/tree.c:595: error: 'struct tree' has no member named 'basename'
tar/tree.c: In function 'tree_current_stat':
tar/tree.c:606: error: 'struct tree' has no member named 'flags'
tar/tree.c:607: error: 'struct tree' has no member named 'st'
tar/tree.c:609: error: 'struct tree' has no member named 'flags'
tar/tree.c:611: error: 'struct tree' has no member named 'st'
tar/tree.c: At top level:
tar/tree.c:615: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
tar/tree.c: In function 'tree_current_lstat':
tar/tree.c:645: error: 'struct tree' has no member named 'flags'
tar/tree.c:646: error: 'struct tree' has no member named 'lst'
tar/tree.c:648: error: 'struct tree' has no member named 'flags'
tar/tree.c:650: error: 'struct tree' has no member named 'lst'
tar/tree.c: In function 'tree_current_is_dir':
tar/tree.c:672: error: 'struct tree' has no member named 'flags'
tar/tree.c: In function 'tree_current_is_physical_dir':
tar/tree.c:714: error: 'struct tree' has no member named 'flags'
tar/tree.c: In function 'tree_current_access_path':
tar/tree.c:763: error: 'struct tree' has no member named 'basename'
tar/tree.c: In function 'tree_current_path':
tar/tree.c:772: error: 'struct tree' has no member named 'buff'
tar/tree.c: In function 'tree_current_pathlen':
tar/tree.c:781: error: 'struct tree' has no member named 'path_length'
tar/tree.c: In function 'tree_current_depth':
tar/tree.c:790: error: 'struct tree' has no member named 'depth'
tar/tree.c: In function 'tree_close':
tar/tree.c:802: error: 'struct tree' has no member named 'buff'
make[1]: *** [tar/bsdtar-tree.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f tar/.deps/bsdtar-write.Tpo tar/.deps/bsdtar-write.Po
make: *** [all] Error 2
shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_libarchive/work/libarchive-2.8.4" && /usr/bin/make -j2 all " returned error 2
Error: Target org.macports.build returned: shell command failed
Warning: the following items did not execute (for libarchive): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Log for libarchive is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_libarchive/main.log
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>
  1. Here are the configure args that allow this port to build properly and still meet dependency requirements for other ports:

--without-bsdtar --without-bsdcpio

Attachments (2)

libarchive284_debug_fail_mp191.txt (101.0 KB) - added by hackdefendr (HackDefendr) 14 years ago.
debug output port install libarchive
Portfile (958 bytes) - added by hackdefendr (HackDefendr) 14 years ago.
The edited Portfile used to successfully build libarchive

Download all attachments as: .zip

Change History (12)

Changed 14 years ago by hackdefendr (HackDefendr)

debug output port install libarchive

Changed 14 years ago by hackdefendr (HackDefendr)

Attachment: Portfile added

The edited Portfile used to successfully build libarchive

comment:1 Changed 14 years ago by jmroot (Joshua Root)

Cc: toby removed
Keywords: libarchive cpio tar bzip2 bsdtar bsdcpio removed
Owner: changed from macports-tickets@… to toby@…

port info libarchive shows @macports.org in the maintainers field here.

comment:2 in reply to:  1 Changed 14 years ago by hackdefendr (HackDefendr)

Replying to jmr@…:

port info libarchive shows @macports.org in the maintainers field here.

It doesn't in the Portfile...Can we not divert attention from the actual bug please?

comment:3 Changed 14 years ago by tobypeterson

Status: newassigned

CC'ing the correct person is a good way to *get* attention for your bug. Ignoring useless complaints about the variants (fyi, there's no variant to disable lzma).

Looks like the issue is that you have some bogus headers on your system:

checking windows.h usability... yes
checking windows.h presence... yes
checking for windows.h... yes

Do you know where that's coming from? If it's in /opt/local/include, what's the output of port provides /opt/local/include/windows.h ?

Last edited 3 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:4 Changed 14 years ago by hackdefendr (HackDefendr)

What do you mean there is no variant to disable lzma in libarchive...what sources are you working with? Clearly there is an lzma variant for libarchive, yet in the Portfile the default configure arg for lzma is --without-lzma.

# port info libarchive
libarchive @2.8.4 (archivers)
Variants:             lzma, universal

Description:          Libarchive is a programming library that can create and read several different streaming archive formats,
                      including most popular tar variants and several cpio formats. It can also write shar archives.
Homepage:             http://code.google.com/p/libarchive/

Library Dependencies: bzip2, zlib, openssl
Platforms:            darwin
License:              unknown
Maintainers:          toby@macports.org

windows.h does not exist on my Macbook ... I can only assume it is something with libarchive and the way it detects supported header files.

# find /opt/local -name windows.h
#
# find /usr/local -name windows.h
#

comment:5 Changed 14 years ago by tobypeterson

The lzma variant is to enable lzma, not disable. Anyway, windows.h does exist on your system - the log is quite clear about that. Maybe in /usr ?

comment:6 Changed 14 years ago by hackdefendr (HackDefendr)

/usr/include/wine/windows.h...but if its there, Apple put it there, since that path is not in my Macports path, and definitely not used when I compile sources outside of Macports. I know better than to install or even compile against what Apple puts in /usr.

-lzma would disable the variant, no?

Having a default configure arg of --without-lzma seems redundant if its not turned on by default and thus requiring the lzma variant to enable it.

comment:7 Changed 14 years ago by hackdefendr (HackDefendr)

Also ... I don't run Wine of any type on my Mac's. So I have no idea how it got there.

comment:8 Changed 14 years ago by tobypeterson

Resolution: worksforme
Status: assignedclosed

Apple does not install /usr/include/wine/windows.h, so you must have put that there somehow. Does port provides /usr/include/wine/windows.h show anything? If so that's a bug with whichever port did that.

LZMA will build by default without --without-lzma, which is why --without-lzma is passed by default, with +lzma to enable (or un-disable) lzma support. It's really very straightforward.

Anyway, this is not a bug in the libarchive port.

comment:9 Changed 14 years ago by hackdefendr (HackDefendr)

Then explain to me why adding --disable-bsdtar and --disable-bsdcpio allow this port to build...despite the windows.h being there. Neither tar nor cpio have anything to do with Windows nor Wine.

Not to mention /usr and /usr/local are not in my path for LIBS, LDFLAGS, not CFLAGS...so how come a port from Macports is finding it in the first place? If it was really that straightforward then we wouldn't be having this conversation in the first place...would we? If libarchive tries to enable lzma support by default, then maybe the Variant should be used to turn it off when not needed/desired. That sounds a lot more straightforward to me.

It builds with the changes I made, and doesn't when I try to build using the default Portfile. All of the deps needing libarchive are happy...so please explain to me how this can be true when that windows.h files is still there?

comment:10 Changed 14 years ago by tobypeterson

bsdtar is the component that has special-casing for Windows, as you can see in the build log. Thus, disabling it works around your bogus headers.

/usr and /usr/local are searched by the compiler, by default.

The Portfile disables LZMA by default to try to reduce the number of dependencies. Users who want LZMA support can use the variant. Typically variants *add* functionality rather than remove it.

With the changes you made, the library portion of libarchive will build fine, and satisfy its dependents. However you won't get bsdtar/bsdcpio.

Note: See TracTickets for help on using tickets.