Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure change: use pkg-config (PKG_CONFIG) #520

Closed
wants to merge 1 commit into from
Closed

configure change: use pkg-config (PKG_CONFIG) #520

wants to merge 1 commit into from

Conversation

dcstes
Copy link
Contributor

@dcstes dcstes commented Sep 17, 2020

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Support PKG_CONFIG in configure for UnicodePlugin :

PKG_CONFIG path to pkg-config utility
PKG_CONFIG_PATH
directories to add to pkg-config's search path
PKG_CONFIG_LIBDIR
path overriding pkg-config's built-in search path
UNICODE_PLUGIN_CFLAGS
C compiler flags for UNICODE_PLUGIN, overriding pkg-config
UNICODE_PLUGIN_LIBS
linker flags for UNICODE_PLUGIN, overriding pkg-config

Note that I believe that Ian Piumarta's "cmake" system for squeak-4 also
uses pkg-config (when he changed from autoconf to 'cmake').

The reason why I made this change, is for compiling on Solaris 11.4.

You can see in the "mvm" script that I set PKG_CONFIG_PATH for the 64bit:

On Solaris 11.4 32bit there is:

pkg-config --cflags glib-2.0

-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include

and on Solaris 11.4 64bit there is:

PKG_CONFIG_PATH=/usr/lib/64/pkgconfig pkg-config --cflags glib-2.0

-I/usr/include/glib-2.0 -I/usr/lib/amd64/glib-2.0/include

Note the '64' or 'amd64' subdirectories.

Finally a remark: I modified

platforms/unix/config/make.cfg.in

because I don't see how to define the UNICODE_PLUGIN_CFLAGS in the plugin,
locally, without setting the variable globally (in all Makefiles).

Because of the 'mkmf' script, this will thus modify all Unix Makefiles ...

If somebody has a better idea, let's hear it !

I understand from Eliot Miranda that abandoning 'configure' is an option.

But that still has the issue of multiple locations on various Unix flavors,
for the GTK include files and libraries ...

David Stes

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJfY5HNAAoJEAwpOKXMq1MaLpEIAL0qgm0zmtJs3kqV9GHli96I
+OQZHL9lLn9gNjyaohpPF7UXhXjr4VbXzjrPAjU8vDR7yImNwe11bcN39VH5nwtt
VrbXA3PpKFNyz5gWBWpyVs1k5ey4UZBSFF/76KwgdruDlXR/aQ7QLwR8WcC6UIfV
rYcvFyLaadwIDV2XoseoVpB91J+Vjy5x/hD+bT6MNybXuvWj5hYli8obdtiBi5aS
8zhBGmZnnKS8+cyfBlmbAjKknUQuy11mhos6FDQX2Wbr/VtBUYgXphcF8cYMnSIe
jV1ZOaA1IQgJ+0kXGKehjqMB/EPs5LA35sUJ8nI2YC3yww0z7n+rzC8n7UttFsg=
=Miad
-----END PGP SIGNATURE-----

@krono
Copy link
Member

krono commented Sep 17, 2020

I'd rather not use pkg-config just for parts of the system.
Either most things are found that way or it is not worth it…

@dcstes
Copy link
Contributor Author

dcstes commented Sep 17, 2020

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

OK, it's true that this may be a risky change to 'configure'.

I don't have a problem with closing/withdrawing this pull request ...

I can work-around the issue with some alternatives (like replacing the hardcoded paths by other paths), so I don't really mind.

Note that the squeak-4 package ("cmake") uses pkg-config however.

David Stes

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJfY5d7AAoJEAwpOKXMq1MaisUH/Rxk9mUC+8VIYO1Zrqy7b4tn
6Q6T4I/CPek1eGHqUgFUSAQXqp2WM/8aSvNHiPUyEUGOqkjWMRtn0julkSS4q5xN
2gqDqWUUNJYrQiWFlKA8trzxLlhd4JN7JpiAZlWx4z9Jlu0ECe0uqCI9kBc99hS2
iOPE0qKfWAnH/Y0ABdkf2cLBZQWWrqYADDUeJ98I9b/NukES4QnSZ+ZtIbOE5V+i
AzVU4J/LHs85KrSW/Y4RggnvUXhik6A9TxvqKosVhmcwlgllUTsZnmzbHhZwrj2j
qVrs4nQo7yq2DjF4+dVc9ParBf4IR1dw+QYNShyIdF8IaYyh1YOq7RwP1Qwf8QY=
=dq3V
-----END PGP SIGNATURE-----

@krono
Copy link
Member

krono commented Sep 17, 2020

Note that the squeak-4 package ("cmake") uses pkg-config however.

Yeah, I'm painfully aware :)
There are so many moving parts…

@dcstes
Copy link
Contributor Author

dcstes commented Sep 18, 2020

I'm closing this pull request. For me this "configure" change works.

It's simply:

PKG_CHECK_MODULES(UNICODE_PLUGIN,[glib-2.0 pangocairo],,AC_PLUGIN_DISABLE)

the "PKG_CHECK_MODULES" macro checks whether glib-2.0 and pangocairo are installed VIA the pkg-config tool.

My understanding is that GTK uses pkg-config exactly for this purpose.

But it's true that any change to 'configure' has some risk associated to it (it may break things on some other platforms). Because I have a workaround, I'm closing the request.

I'll just open a request to document in the README that we have discussed the issue, so that somebody who stumbles upon the same issue in the future, knows about it.

It's seems likely that this issue will come up again - on different platforms.

4 similar comments
@dcstes
Copy link
Contributor Author

dcstes commented Sep 18, 2020

I'm closing this pull request. For me this "configure" change works.

It's simply:

PKG_CHECK_MODULES(UNICODE_PLUGIN,[glib-2.0 pangocairo],,AC_PLUGIN_DISABLE)

the "PKG_CHECK_MODULES" macro checks whether glib-2.0 and pangocairo are installed VIA the pkg-config tool.

My understanding is that GTK uses pkg-config exactly for this purpose.

But it's true that any change to 'configure' has some risk associated to it (it may break things on some other platforms). Because I have a workaround, I'm closing the request.

I'll just open a request to document in the README that we have discussed the issue, so that somebody who stumbles upon the same issue in the future, knows about it.

It's seems likely that this issue will come up again - on different platforms.

@dcstes
Copy link
Contributor Author

dcstes commented Sep 18, 2020

I'm closing this pull request. For me this "configure" change works.

It's simply:

PKG_CHECK_MODULES(UNICODE_PLUGIN,[glib-2.0 pangocairo],,AC_PLUGIN_DISABLE)

the "PKG_CHECK_MODULES" macro checks whether glib-2.0 and pangocairo are installed VIA the pkg-config tool.

My understanding is that GTK uses pkg-config exactly for this purpose.

But it's true that any change to 'configure' has some risk associated to it (it may break things on some other platforms). Because I have a workaround, I'm closing the request.

I'll just open a request to document in the README that we have discussed the issue, so that somebody who stumbles upon the same issue in the future, knows about it.

It's seems likely that this issue will come up again - on different platforms.

@dcstes
Copy link
Contributor Author

dcstes commented Sep 18, 2020

I'm closing this pull request. For me this "configure" change works.

It's simply:

PKG_CHECK_MODULES(UNICODE_PLUGIN,[glib-2.0 pangocairo],,AC_PLUGIN_DISABLE)

the "PKG_CHECK_MODULES" macro checks whether glib-2.0 and pangocairo are installed VIA the pkg-config tool.

My understanding is that GTK uses pkg-config exactly for this purpose.

But it's true that any change to 'configure' has some risk associated to it (it may break things on some other platforms). Because I have a workaround, I'm closing the request.

I'll just open a request to document in the README that we have discussed the issue, so that somebody who stumbles upon the same issue in the future, knows about it.

It's seems likely that this issue will come up again - on different platforms.

@dcstes
Copy link
Contributor Author

dcstes commented Sep 18, 2020

I'm closing this pull request. For me this "configure" change works.

It's simply:

PKG_CHECK_MODULES(UNICODE_PLUGIN,[glib-2.0 pangocairo],,AC_PLUGIN_DISABLE)

the "PKG_CHECK_MODULES" macro checks whether glib-2.0 and pangocairo are installed VIA the pkg-config tool.

My understanding is that GTK uses pkg-config exactly for this purpose.

But it's true that any change to 'configure' has some risk associated to it (it may break things on some other platforms). Because I have a workaround, I'm closing the request.

I'll just open a request to document in the README that we have discussed the issue, so that somebody who stumbles upon the same issue in the future, knows about it.

It's seems likely that this issue will come up again - on different platforms.

@dcstes
Copy link
Contributor Author

dcstes commented Sep 18, 2020

Sorry for multiple messages, when I click "Close with comment" Github does not seems to close my pull request. It's ok to close it anyway, sorry for the multiple messages.

@krono
Copy link
Member

krono commented Sep 18, 2020

Sorry for multiple messages, when I click "Close with comment" Github does not seems to close my pull request. It's ok to close it anyway, sorry for the multiple messages.

No worries. In any case, thanks for your efforts!

@krono krono closed this Sep 18, 2020
hogoww referenced this pull request in hogoww/opensmalltalk-vm Dec 23, 2021
… false ] on method [ postBecomeScanClassTable: ]
hogoww referenced this pull request in hogoww/opensmalltalk-vm Dec 23, 2021
…false ] on method [ postBecomeScanClassTable: ] KILLED by 2/3 test cases.
hogoww referenced this pull request in hogoww/opensmalltalk-vm Feb 26, 2022
…: ] on method [ fetchClassOfNonImm: ] 9 test cases.
hogoww referenced this pull request in hogoww/opensmalltalk-vm Feb 26, 2022
… ] on method [ fetchClassOfNonImm: ] 9/9 test case are EQUIVALENT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants