New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #14203 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

apr fails to build if ossp-uuid is activated (dependency of postgresql83)

Reported by: nox@… Owned by: dluke@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc: mww@…, jwa@…
Port:

Description

 Conflicting uuid_t types error building apr
I know Daniel noticed the bug on the ml, but let's keep a trace of it here.

Attachments

ossp_uuid_move.diff Download (1.1 KB) - added by dluke@… 4 years ago.
Changes to move ossp-uuid header
ossp_uuid_move.2.diff Download (1.2 KB) - added by dluke@… 4 years ago.
Changes to move ossp-uuid header
Portfile.diff Download (486 bytes) - added by marcuscalhounlopez@… 4 years ago.

Change History

  Changed 4 years ago by afb@…

  Changed 4 years ago by dluke@…

  • summary changed from apr fails to build if postgresql83 is activated to apr fails to build if ossp-uuid is activated (dependency of postgresql83)

  Changed 4 years ago by dluke@…

  • cc mww@…, jwa@… added
  • status changed from new to assigned

ossp-uuid is nomaintainer, and it looks like only postgresql83 uses it.

Perhaps we can move the ossp-uuid include files (so that apr doesn't pull them in) and modify the postgresql83 port to still be able to find them?

  Changed 4 years ago by nox@…

I'd rather modify apr to not use uuid.h or fix ossp-uuid itself

  Changed 4 years ago by dluke@…

apr finds uuid.h from ossp-uuid (instead of the system uuid.h) because it's installed in ${prefix}/include and we add that to the CPPFLAGS.

Since the uuid.h installed by ossp-uuid is somewhat broken, I think it makes sense to instead modify where it gets installed so that a little extra work needs to be done by any ports that want the uuid.h from ossp-uuid (which is only the postgresql83 port, currently).

Of course, I would probably also have the postgres83 contrib modules (including what actually pulls in ossp-uuid as a dependency) as a variant, but that's just me ;-)

Changed 4 years ago by dluke@…

Changes to move ossp-uuid header

Changed 4 years ago by dluke@…

Changes to move ossp-uuid header

  Changed 4 years ago by dluke@…

Can a postgres maintainer take a look and decide if this is acceptable?

Thanks.

follow-up: ↓ 9   Changed 4 years ago by bulk@…

Hi ya, any movement here? This problem more or less make having apache (which depends on apr) and postgres on the same box impossible. thanks! --nickg

follow-up: ↓ 10   Changed 4 years ago by marcuscalhounlopez@…

One solution seems to be to force apr to use the system uuid.
Attached is a patch to the apr Portfile which accomplishes this (at least on Leopard).

Changed 4 years ago by marcuscalhounlopez@…

in reply to: ↑ 7   Changed 4 years ago by dluke@…

Replying to bulk@modp.com:

Hi ya, any movement here? This problem more or less make having apache (which depends on apr) and postgres on the same box impossible.

A workaround is to deactivate ossp-uuid just while building apr (or building apr before building postgres)

in reply to: ↑ 8 ; follow-up: ↓ 11   Changed 4 years ago by dluke@…

Replying to marcuscalhounlopez@mac.com:

One solution seems to be to force apr to use the system uuid.
Attached is a patch to the apr Portfile which accomplishes this (at least on Leopard).

That could work as well (although I really think that since ossp-uuid is putting a broken header into our default include search path, that it should be ossp-uuid that gets changed).

If I have some time to build-test postgres with my proposed ossp-uuid changes, I'll commit them as I haven't heard anything back from the maintainers.

in reply to: ↑ 10 ; follow-up: ↓ 12   Changed 4 years ago by bulk@…

Oh you are going to like this!

Summary: [tested only on OSX10.5]

ossp_uuid:

add "--includedir=${prefix}/include/ossp" to configure.args (and bump the revision)

postgres83:

nothing!

LONG ANSWER:

You don't need to change postgresql83 at all, and infact it appears putting it in ossp-uuid/uuid.h is not quite right.

I applied the patches... ossp-uuid built fine and moved the header file. But postgresql83's configure got angry and exited since it couldn't find <uuid.h> or <ossp/uuid.h> inspite of having the include changed (maybe I did it wrong).

So I changed ossp-uuid to

configure.args  --mandir=${prefix}/share/man --without-perl \
                --includedir=${prefix}/include/ossp

reinstalled ossp-uuid and then postgresql83 compiled. It did make some ugly warnings about uuid being 'present but not usable' but then the next check found ossp/uuid.h and everything was ok.

Even better it seems to work too:

# select uuid_generate_v1();
           uuid_generate_v1           
--------------------------------------
 38272eca-ff92-11dc-b100-d7c00d1e1739
(1 row)

ta-da

in reply to: ↑ 11   Changed 4 years ago by dluke@…

  • status changed from assigned to closed
  • resolution set to fixed

Replying to bulk@modp.com:

Oh you are going to like this!

You're right, I do!

Summary: [tested only on OSX10.5] ossp_uuid: add "--includedir=${prefix}/include/ossp" to configure.args (and bump the revision)

committed in r35646

It did make some ugly warnings about uuid being 'present but not usable' but then the next check found ossp/uuid.h and everything was ok.

Those warnings are a known bug (and are a conflict between the ossp-uuid uuid.h and a system include file that it shouldn't conflict with).

Thanks for your help!

  Changed 3 years ago by anonymous

  • milestone Port Bugs deleted

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.