Bug 163712 - [PATCH] devel/ace attempts to cast const pointer to non-const
Summary: [PATCH] devel/ace attempts to cast const pointer to non-const
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-30 08:00 UTC by Anthony Chavez
Modified: 2012-01-10 19:28 UTC (History)
0 users

See Also:


Attachments
file.diff (332 bytes, patch)
2011-12-30 08:00 UTC, Anthony Chavez
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Chavez 2011-12-30 08:00:28 UTC
When attempting to build this port, the following error is produced.  The attached patch addresses this and results in a successful build.

libtool: compile:  env CCACHE_PREFIX=/usr/local/bin/distcc /usr/local/bin/ccache c++ -DHAVE_CONFIG_H -I. -I../../../ace/SSL -I../../ace -I../../.. -I../.. -DACE_SSL_BUILD_DLL -D_REENTRANT -D_THREAD_SAFE -W -Wall -Wpointer-arith -I/usr/local/include -O2 -pipe -fno-strict-aliasing -pthread -pipe -MT libACE_SSL_la-SSL_SOCK.lo -MD -MP -MF .deps/libACE_SSL_la-SSL_SOCK.Tpo -c ../../../ace/SSL/SSL_SOCK.cpp -o libACE_SSL_la-SSL_SOCK.o >/dev/null 2>&1
../../../ace/SSL/SSL_Context.cpp: In member function 'int ACE_SSL_Context::set_mode(int)':
../../../ace/SSL/SSL_Context.cpp:239: error: invalid conversion from 'const SSL_METHOD*' to 'SSL_METHOD*'
../../../ace/SSL/SSL_Context.cpp:242: error: invalid conversion from 'const SSL_METHOD*' to 'SSL_METHOD*'
../../../ace/SSL/SSL_Context.cpp:245: error: invalid conversion from 'const SSL_METHOD*' to 'SSL_METHOD*'
../../../ace/SSL/SSL_Context.cpp:248: error: invalid conversion from 'const SSL_METHOD*' to 'SSL_METHOD*'
../../../ace/SSL/SSL_Context.cpp:251: error: invalid conversion from 'const SSL_METHOD*' to 'SSL_METHOD*'
../../../ace/SSL/SSL_Context.cpp:254: error: invalid conversion from 'const SSL_METHOD*' to 'SSL_METHOD*'
../../../ace/SSL/SSL_Context.cpp:257: error: invalid conversion from 'const SSL_METHOD*' to 'SSL_METHOD*'
../../../ace/SSL/SSL_Context.cpp:260: error: invalid conversion from 'const SSL_METHOD*' to 'SSL_METHOD*'
../../../ace/SSL/SSL_Context.cpp:263: error: invalid conversion from 'const SSL_METHOD*' to 'SSL_METHOD*'
../../../ace/SSL/SSL_Context.cpp:266: error: invalid conversion from 'const SSL_METHOD*' to 'SSL_METHOD*'
../../../ace/SSL/SSL_Context.cpp:269: error: invalid conversion from 'const SSL_METHOD*' to 'SSL_METHOD*'
../../../ace/SSL/SSL_Context.cpp:272: error: invalid conversion from 'const SSL_METHOD*' to 'SSL_METHOD*'
../../../ace/SSL/SSL_Context.cpp:275: error: invalid conversion from 'const SSL_METHOD*' to 'SSL_METHOD*'
gmake[3]: *** [libACE_SSL_la-SSL_Context.lo] Error 1
gmake[3]: *** Waiting for unfinished jobs....
libtool: compile:  env CCACHE_PREFIX=/usr/local/bin/distcc /usr/local/bin/ccache c++ -DHAVE_CONFIG_H -I. -I../../../ace/SSL -I../../ace -I../../.. -I../.. -DACE_SSL_BUILD_DLL -D_REENTRANT -D_THREAD_SAFE -W -Wall -Wpointer-arith -I/usr/local/include -O2 -pipe -fno-strict-aliasing -pthread -pipe -MT libACE_SSL_la-SSL_SOCK_Acceptor.lo -MD -MP -MF .deps/libACE_SSL_la-SSL_SOCK_Acceptor.Tpo -c ../../../ace/SSL/SSL_SOCK_Acceptor.cpp -o libACE_SSL_la-SSL_SOCK_Acceptor.o >/dev/null 2>&1
gmake[3]: Leaving directory `/usr/ports/devel/ace/work/ACE_wrappers/objdir/ace/SSL'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/usr/ports/devel/ace/work/ACE_wrappers/objdir/ace'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/usr/ports/devel/ace/work/ACE_wrappers/objdir/ace'
gmake: *** [all-recursive] Error 1
*** Error code 1

Stop in /usr/ports/devel/ace.

Fix: --- patch-ace+SSL+SSL_Context.cpp begins here ---
How-To-Repeat: % c++ --version
c++ (GCC) 4.2.2 20070831 prerelease [FreeBSD]
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% sudo portmaster devel/ace
Comment 1 Ruslan Makhmatkhanov freebsd_committer 2012-01-01 17:59:05 UTC
Responsible Changed
From-To: freebsd-ports-bugs->rm

I will take it.
Comment 2 R.Mahmatkhanov 2012-01-03 08:23:56 UTC
Ok, this patch fixing build of devel/ace when security/openssl is 
installed, but it breaks the build with stock openssl. This patch should 
be applied conditionally somehow, or, as was suggested on #bsdports, 
some gcc -W option should be applied instead to suppress this warning.
I tried both and failed, so i return this to the pool, so somebody more 
experienced will take care of it. Sorry.

-- 
Regards,
Ruslan

Tinderboxing kills... the drives.
Comment 3 Ruslan Makhmatkhanov freebsd_committer 2012-01-03 08:25:29 UTC
Responsible Changed
From-To: rm->freebsd-ports-bugs

Back to the pool.
Comment 4 dfilter service freebsd_committer 2012-01-10 19:10:29 UTC
pawel       2012-01-10 19:10:15 UTC

  FreeBSD ports repository

  Added files:
    devel/ace/files      patch-ace-ssl-ssl_context.cpp 
  Log:
  Fix build with openssl from ports
  
  PR:             ports/163712
  Reported by:    Anthony Chavez <acc@hexadecagram.org>
  
  Revision  Changes    Path
  1.1       +14 -0     ports/devel/ace/files/patch-ace-ssl-ssl_context.cpp (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 Pawel Pekala freebsd_committer 2012-01-10 19:28:48 UTC
State Changed
From-To: open->closed

Fixed. Thanks for reporting!