[42620] trunk/dports/databases/mysql5-devel/Portfile

Big O illogical1 at gmail.com
Fri Nov 28 08:33:08 PST 2008


On Fri, Nov 28, 2008 at 4:32 AM, Ryan Schmidt <ryandesign at macports.org> wrote:
> On Nov 27, 2008, at 22:42, Big O wrote:
>
>> On Thu, Nov 27, 2008 at 4:49 AM, Ryan Schmidt wrote:
>>
>>> On Nov 26, 2008, at 15:48, illogic-al at macports.org wrote:
>>>
>>>> Revision: 42620
>>>>         http://trac.macports.org/changeset/42620
>>>> Author:   illogic-al at macports.org
>>>> Date:     2008-11-26 13:48:36 -0800 (Wed, 26 Nov 2008)
>>>> Log Message:
>>>> -----------
>>>> Add embedded_server variant. Add revision. Fixes ticket #17410.
>>>
>>> I'll have to look at this feature, but I may want to just build this all
>>> the
>>> time and forget the variant. (Variants should be created sparingly and
>>> only
>>> when really necessary.) I'm just not sure what's up with the -fPIC and
>>> --with-pic business. Can you explain?
>>
>> libmysqld.a needs to be built with -fPIC because it will be linked in
>> a shared library. the configure flag --with-pic is supposed to do this
>> but, do to a bug in mysql-5.1 it does not. That's why the c(xx)flag
>> -fPIC is explicitly added.
>> http://bugs.mysql.com/bug.php?id=39288
>> I don't know how building all of mysql with -fPIC would change/affect
>> anything so I thought making the change in a variant would keep any
>> issues localized to +embedded_server users (i.e. amarok users).
>
> How did you know to use the --with-pic option, and what is the symptom of
> not using it?
Discussion of this took place around september on the amarok-devel
mailing list. here's an excerpt
"By the way, forgot to mention that the "-fPIC or not -fPIC" debate is
irrelevant. Mysql's configure script has a --with-pic flag, so
packaging a PIC-enabled libmysqld is not screwing with the package
everyone uses, but adding a flexibility, suggested by mysql itself. On
the other hand, this flag is borked and does nothing for libmysqld,
but upstream agreed that it's their fault (see relevant mysql bug), so
it's package maintainers' responsibility to fix it downstream."
For any code going into a shared library -fPIC is required. Basically
libmysqld.a (static lib) is being linked to libamarok-sqlcollection.so
 (dynamic lib) and that's why we need -fPIC when creating libmysqld.a.
One downside of this is that the resulting shared lib is rather large
(especially when doing a universal build). Using -fpic instead might
solve this but I haven't tried and don't intend to.
The mailing list is private so I can't link to it here, but this
gentoo bug report provides more info as well, including how to build a
shared library which I tried and didn't get to work properly.
http://bugs.gentoo.org/show_bug.cgi?id=238487

>
>
>>> Some discussion on this change beforehand would have been good. You did
>>> nothing wrong since the port is openmaintainer, and mysql5-devel is a
>>> low-profile port because nobody should be using -devel ports for anything
>>> important, however mysql5 is a high-profile port and I strive to keep
>>> mysql5
>>> and mysql5-devel in sync in terms of features. So I'm going to remove
>>> openmaintainer from mysql5-devel now. I'm happy to entertain any changes
>>> you
>>> want to make, I just need to know about them and understand them so that
>>> I
>>> can properly support users who come to me asking about them.
>>
>> mysql5 can build libmysqld.a as well but from what I understand, this
>> isn't a supported feature. From all reports though, it works fine.
>
> 5.1.x is now the recommended ("generally available") version of MySQL, so
> I'll have to update the mysql5 port to that version soon.
>
>
>>>> Modified Paths:
>>>> --------------
>>>>   trunk/dports/databases/mysql5-devel/Portfile
>>>>
>>>> Modified: trunk/dports/databases/mysql5-devel/Portfile
>>>> ===================================================================
>>>> --- trunk/dports/databases/mysql5-devel/Portfile        2008-11-26
>>>> 21:45:29 UTC (rev 42619)
>>>> +++ trunk/dports/databases/mysql5-devel/Portfile        2008-11-26
>>>> 21:48:36 UTC (rev 42620)
>>>> @@ -5,6 +5,7 @@
>>>>  name                    mysql5-devel
>>>>  set vers                5.1.29
>>>>  version                 ${vers}-rc
>>>> +revision                2
>>>
>>> Note that
>>>
>>> a) there was no reason to increase the revision when only adding a
>>> variant,
>>> because nothing will change for anyone who already had the port
>>> installed;
>>> anyone who wants this variant still has to rebuild the port with the new
>>> variant (though if we change it to build the embedded server always, and
>>> delete the variant, as I suggested above, then we will have to increase
>>> the
>>> revision, because that will change the files that get installed)
>>
>> I misunderstood the revision's purpose then. I thought that if new
>> files were being installed that I had to add a revision. Sorry.
>
> Yes, you need to increase the revision when the port is changed to install
> different files. However, there is no difference in files for any users who
> had mysql5-devel @5.1.29_0 installed so there's no reason to force them to
> rebuild the port. The only way users will get the different files is to
> uninstall the port and reinstall it with the new variant selected.
>
> If, on the other hand, you had changed the files that get installed by an
> existing variant, or by the port itself when no variant is selected, then
> increasing the revision is warranted.
>
>
>>> b) the default revision is 0, not 1, so if you add a revision line to a
>>> port
>>> that didn't have one, in order to increase the revision, the line should
>>> set
>>> the revision to 1, not 2
>>
>> Should I fix that?
>
> No, but do keep it in mind for future port updates.
>
Will do.



-- 
All your gmail are belong to us.


More information about the macports-dev mailing list