Re: meson's in-tree libpq header search order vs -Dextra_include_dirs
| От | Thomas Munro | 
|---|---|
| Тема | Re: meson's in-tree libpq header search order vs -Dextra_include_dirs | 
| Дата | |
| Msg-id | CA+hUKG+x-cys30=7L2B8=cZ+-z6QDOj-oQy9O3CnkeXnrnm3OQ@mail.gmail.com обсуждение исходный текст  | 
		
| Ответ на | Re: meson's in-tree libpq header search order vs -Dextra_include_dirs (Thomas Munro <thomas.munro@gmail.com>) | 
| Список | pgsql-hackers | 
On Sat, Nov 1, 2025 at 10:13 AM Thomas Munro <thomas.munro@gmail.com> wrote: > On Sat, Nov 1, 2025 at 7:14 AM Heikki Linnakangas <hlinnaka@iki.fi> wrote: > > However, I'm worried that we'll soon break it again. The new rule is > > apparently "include libpq first", but we have no way of enforcing it. > > Hmm, my meson-fu is weak, but there must surely be some way to declare > that you want libpq and have it automatically put things in the right > order, will look into that... If we really don't want every site that depends on both libpq and frontend_code to have to remember to respect that order when declaring dependencies, then we could instead change frontend_code to force libpq_inc to appear in its include_directories before postgres_inc (= where extra_include_dirs comes from). This one-liner fixes the build on my system: # for frontend binaries frontend_code = declare_dependency( - include_directories: [postgres_inc], + include_directories: [libpq_inc, postgres_inc], That feels a little odd, because libpq is not really a dependency of frontend_code, and not all frontend_code users also use libpq (though almost all do). Does this have any unwanted side-effects? Is there a better way to do this in a central place? There are two other places that already have those two in include_directories already, so their order should surely be flipped to match, they just didn't happen to break on my system (I guess by luck, ie not accessing APIs that changed incompatibly since the version in my system-installed libpq headers).
Вложения
В списке pgsql-hackers по дате отправления: