Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#63267 closed defect (fixed)

libproxy @0.4.17_0+python27: Error building with GCC 4.2

Reported by: evanmiller (Evan Miller) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc:
Port: libproxy

Description

Log snippet:

:info:build [ 65%] Building CXX object libproxy/CMakeFiles/libproxy.dir/url.cpp.o
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_libproxy/libproxy/work/build/libproxy && /opt/local/bin/g++-apple-4.2 -D_POSIX_C_SOURCE=200112L -Dlibproxy_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_libproxy/libproxy/work/libproxy-0.4.17 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -fvisibility=hidden -pipe -Os -DNDEBUG -I/opt/local/include -D_DARWIN_C_SOURCE=1 -arch ppc -mmacosx-version-min=10.4 -fPIC -o CMakeFiles/libproxy.dir/url.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_libproxy/libproxy/work/libproxy-0.4.17/libproxy/url.cpp
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_libproxy/libproxy/work/libproxy-0.4.17/libproxy/url.cpp: In member function 'char* libproxy::url::get_pac()':
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_libproxy/libproxy/work/libproxy-0.4.17/libproxy/url.cpp:514: error: 'class std::vector<char, std::allocator<char> >' has no member named 'data'
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_libproxy/libproxy/work/libproxy-0.4.17/libproxy/url.cpp:537: error: 'class std::vector<char, std::allocator<char> >' has no member named 'data'

System info:

:debug:sysinfo Mac OS X 10.4.11 (darwin/8.11.0) arch powerpc
:debug:sysinfo MacPorts 2.7.1
:debug:sysinfo Xcode 2.5
:debug:sysinfo SDK 10.4
:debug:sysinfo MACOSX_DEPLOYMENT_TARGET: 10.4

Environment:

:debug:configure CC='/opt/local/bin/gcc-apple-4.2'
:debug:configure CC_PRINT_OPTIONS='YES'
:debug:configure CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_libproxy/libproxy/work/.CC_PRINT_OPTIONS'
:debug:configure CFLAGS='-pipe -Os -DNDEBUG -I/opt/local/include -D_DARWIN_C_SOURCE=1'
:debug:configure CPATH='/opt/local/include'
:debug:configure CXX='/opt/local/bin/g++-apple-4.2'
:debug:configure CXXFLAGS='-pipe -Os -DNDEBUG -I/opt/local/include -D_DARWIN_C_SOURCE=1'
:debug:configure DEVELOPER_DIR='/Developer'
:debug:configure F90FLAGS='-pipe -Os -m32'
:debug:configure FCFLAGS='-pipe -Os -m32'
:debug:configure FFLAGS='-pipe -Os -m32'
:debug:configure INSTALL='/usr/bin/install -c'
:debug:configure LDFLAGS='-L/opt/local/lib -Wl,-headerpad_max_install_names'
:debug:configure LIBRARY_PATH='/opt/local/lib'
:debug:configure MACOSX_DEPLOYMENT_TARGET='10.4'
:debug:configure OBJC='/opt/local/bin/gcc-apple-4.2'
:debug:configure OBJCFLAGS='-pipe -Os -I/opt/local/include -D_DARWIN_C_SOURCE=1'
:debug:configure OBJCXX='/opt/local/bin/g++-apple-4.2'
:debug:configure OBJCXXFLAGS='-pipe -Os -DNDEBUG -I/opt/local/include -I/opt/local/include -D_DARWIN_C_SOURCE=1'

Full log to follow.

Attachments (1)

main.log (105.7 KB) - added by evanmiller (Evan Miller) 3 years ago.
Complete install log

Download all attachments as: .zip

Change History (8)

Changed 3 years ago by evanmiller (Evan Miller)

Attachment: main.log added

Complete install log

comment:1 Changed 3 years ago by evanmiller (Evan Miller)

libproxy does compile successfully on the same platform with configure.compiler=macports-gcc-7.

comment:2 Changed 3 years ago by evanmiller (Evan Miller)

According to this thread:

https://lists.isocpp.org/std-discussion/2021/08/1372.php

The "data" member of std::vector was not included in Apple GCC 4.2, and was not standardized until C++11.

comment:3 Changed 3 years ago by kencu (Ken)

looks like you nailed it. Our usual next step would be to add *.gcc-4.* to the compiler blacklist for the port, referencing this ticket.

Version 0, edited 3 years ago by kencu (Ken) (next)

comment:4 Changed 3 years ago by evanmiller (Evan Miller)

comment:5 Changed 3 years ago by evanmiller (Evan Miller)

Resolution: fixed
Status: assignedclosed

comment:6 Changed 3 years ago by kencu (Ken)

std::vector.data first appeared in mainline GCC 4.1, but was absent from Apple GCC 4.2, and not standardized until C++11.

See the complete discussion beginning with the message: https://lists.isocpp.org/std-discussion/2021/08/1370.php

comment:7 Changed 3 years ago by ken-cunningham-webuse

In ffb07038fe613a2c3df0f8bdeedbe33b1355fc72/macports-ports (master):

libproxy: needs c++11

the previous blacklisting of older gcc versions
was an incomplete fix; it did force gcc7 on PPC,
but with 10.5 Intel, it forces a build with clang-7.0
against the old non-c++11 libstdc++, which fails.

if we use our compiler.cxx_standard, all is well.

see: #63267

Note: See TracTickets for help on using tickets.