Opened 11 years ago

Closed 10 years ago

Last modified 6 years ago

#40968 closed defect (fixed)

botan fails to build

Reported by: jamesfmarshall@… Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: mavericks Cc: macports@…, crazyhorse671@…, mkae (Marko Käning), cooljeanius (Eric Gallager), hmatuschek@…, axet (Alexey Kuznetsov), angleto@…
Port: botan

Description

I have migrated MacPorts to Mavericks. When I try to build botan, I see the following error:

/usr/bin/clang++ -m64 -Ibuild/include -O3 -finline-functions  -D_REENTRANT -Wno-long-long -W -Wall -fPIC -fvisibility=hidden -c src/ssl/cert_ver.cpp -o build/lib/ssl_cert_ver.o
In file included from src/ssl/c_kex.cpp:8:
In file included from build/include/botan/internal/tls_messages.h:11:
build/include/botan/tls_record.h:23:14: fatal error: 'tr1/functional' file not found
    #include <tr1/functional>
             ^
In file included from src/ssl/cert_req.cpp:8:
In file included from build/include/botan/internal/tls_messages.h:11:
build/include/botan/tls_record.h:23:14: fatal error: 'tr1/functional' file not found
    #include <tr1/functional>
             ^
In file included from src/ssl/cert_ver.cpp:8:
In file included from build/include/botan/internal/tls_messages.h:11:
build/include/botan/tls_record.h:23:14: fatal error: 'tr1/functional' file not found
    #include <tr1/functional>
             ^
1 error generated.
make: *** [build/lib/ssl_c_kex.o] Error 1
make: *** Waiting for unfinished jobs....
1 error generated.
make: *** [build/lib/ssl_cert_req.o] Error 1
1 error generated.
make: *** [build/lib/ssl_cert_ver.o] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_security_botan/botan/work/Botan-1.10.5'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_security_botan/botan/work/Botan-1.10.5" && /usr/bin/make -j4 -w all CXX="/usr/bin/clang++ -m64" 
Exit code: 2
Error: org.macports.build for port botan returned: command execution failed
Warning: targets not executed for botan: org.macports.activate org.macports.build org.macports.destroot org.macports.install
Please see the log file for port botan for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_security_botan/botan/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port botan failed

Can I fix this somehow on my end, or does the port need to be fixed?

Attachments (1)

Portfile-botan.diff (668 bytes) - added by crazyhorse671@… 10 years ago.
Workaround Portfile diff

Download all attachments as: .zip

Change History (21)

comment:1 Changed 11 years ago by jamesfmarshall@…

This is what main.log says at the end:

:info:build /usr/bin/clang++ -m64 -Ibuild/include -O3 -finline-functions  -D_REENTRANT -Wno-long-long -W -Wall -fPIC -fvisibility=hidden -c src/ssl/cert_ver.cpp -o build/lib/ssl_cert_ver.o
:info:build In file included from src/ssl/c_kex.cpp:8:
:info:build In file included from build/include/botan/internal/tls_messages.h:11:
:info:build build/include/botan/tls_record.h:23:14: fatal error: 'tr1/functional' file not found
:info:build     #include <tr1/functional>
:info:build              ^
:info:build In file included from src/ssl/cert_req.cpp:8:
:info:build In file included from build/include/botan/internal/tls_messages.h:11:
:info:build build/include/botan/tls_record.h:23:14: fatal error: 'tr1/functional' file not found
:info:build     #include <tr1/functional>
:info:build              ^
:info:build In file included from src/ssl/cert_ver.cpp:8:
:info:build In file included from build/include/botan/internal/tls_messages.h:11:
:info:build build/include/botan/tls_record.h:23:14: fatal error: 'tr1/functional' file not found
:info:build     #include <tr1/functional>
:info:build              ^
:info:build 1 error generated.
:info:build make: *** [build/lib/ssl_c_kex.o] Error 1
:info:build make: *** Waiting for unfinished jobs....
:info:build 1 error generated.
:info:build make: *** [build/lib/ssl_cert_req.o] Error 1
:info:build 1 error generated.
:info:build make: *** [build/lib/ssl_cert_ver.o] Error 1
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_security_botan/botan/work/Botan-1.10.5'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_security_botan/botan/work/Botan-1.10.5" && /usr/bin/make -j4 -w all CXX="/usr/bin/clang++ -m64" 
:info:build Exit code: 2
:error:build org.macports.build for port botan returned: command execution failed
:debug:build Error code: CHILDSTATUS 21027 2
:debug:build Backtrace: command execution failed
    while executing
"system -nice 0 $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
:info:build Warning: targets not executed for botan: org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Please see the log file for port botan for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_security_botan/botan/main.log

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

Keywords: mavericks added
Owner: changed from macports-tickets@… to mww@…
Port: botan added

The botan software needs to be fixed by its developers. Once they do, we can apply that fix to the portfile. Have you reported the problem to the developers of botan already?

comment:3 Changed 11 years ago by jamesfmarshall@…

No. I'll google them.

comment:4 Changed 11 years ago by jamesfmarshall@…

I reported the bug to the botan folks here: https://bugs.randombit.net/show_bug.cgi?id=251

Last edited 11 years ago by jamesfmarshall@… (previous) (diff)

comment:5 Changed 11 years ago by macports@…

Cc: macports@… added

Cc Me!

comment:6 Changed 11 years ago by jamesfmarshall@…

This is what Jack Lloyd says over on the botan site:

If Botan is being built by a compiler without TR1 support, you need to pass the option --with-tr1=none to configure.py. Alternately, if boost is available, --with-tr=boost will attempt to use it rather than the compiler-provided version. If TR1 is disabled (using none) then the TLS implementation will not be included in the build.

There is version detection for GCC, but for Clang it just assumes TR1 is supported, as I had thought that all versions of Clang with complete enough C++98 to compile botan also include TR1. What version of Clang do you have on your system?

The answer to his question at the end is:

$ clang --version
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

Can someone write a patch to fix this problem, please?

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

comment:7 Changed 10 years ago by jamesfmarshall@…

This does not appear to be a problem with botan. Rather, it appears to be a problem with the configuration of the MacPorts build process for botan. Can't this be fixed rather easily? (I am not a programmer, so No, I cannot do it.)

comment:8 Changed 10 years ago by crazyhorse671@…

Cc: crazyhorse671@… added

Cc Me!

Changed 10 years ago by crazyhorse671@…

Attachment: Portfile-botan.diff added

Workaround Portfile diff

comment:9 in reply to:  7 Changed 10 years ago by crazyhorse671@…

Replying to jamesfmarshall@…:

This does not appear to be a problem with botan. Rather, it appears to be a problem with the configuration of the MacPorts build process for botan. Can't this be fixed rather easily? (I am not a programmer, so No, I cannot do it.)

A workaround is adding "--with-tr1=boost" to configure.args as mentioned above - this makes port botan depend on port boost. See Portfile diff attached.

comment:10 Changed 10 years ago by jamesfmarshall@…

Thanks! I have boost installed, so that should work. I just need to wait for the diff file to be applied.

comment:11 Changed 10 years ago by jamesfmarshall@…

After some poking around to figure out how to do it, I successfully applied the attached portfile diff and was able to build botan. Thank you very much for the portfile diff.

I've never done this before. Will MacPorts know how to update botan in the future, when botan is updated?

comment:12 in reply to:  11 Changed 10 years ago by crazyhorse671@…

Replying to jamesfmarshall@…:

After some poking around to figure out how to do it, I successfully applied the attached portfile diff and was able to build botan. Thank you very much for the portfile diff.

I've never done this before. Will MacPorts know how to update botan in the future, when botan is updated?

After a Portfile update with increased version number has been committed to the remote repository, calling port selfupdate marks the installed port as outdated - calling sudo port upgrade botan then installs the new version and deactivates the old version of the port.

comment:13 Changed 10 years ago by mkae (Marko Käning)

Cc: mk@… added

Cc Me!

comment:14 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:15 Changed 10 years ago by hmatuschek@…

Cc: hmatuschek@… added

Cc Me!

comment:16 Changed 10 years ago by axet (Alexey Kuznetsov)

Cc: axet@… added

Cc Me!

comment:17 Changed 10 years ago by angleto@…

Cc: angleto@… added

Cc Me!

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

Replying to jamesfmarshall@…:

This does not appear to be a problem with botan. Rather, it appears to be a problem with the configuration of the MacPorts build process for botan. Can't this be fixed rather easily? (I am not a programmer, so No, I cannot do it.)

It is a problem with botan that the developers of botan need to fix. My understanding is that the tr1 prefix is old, and is not used anymore on Mavericks.

comment:19 Changed 10 years ago by mkae (Marko Käning)

Resolution: fixed
Status: newclosed

This should be fixed with r114460.

comment:20 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

In cd3df09ec2166ffc843a3b6fc924404d23aa66ed/macports-ports:

botan: workaround for Clang's lack of TR1 support

See #40968

Note: See TracTickets for help on using tickets.