News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

wxPdfDocument: Error while compiling with wxgtk-3.0 - 'fontconfig/fontconfig.h'

Started by demetrioussharpe, December 02, 2017, 04:45:21 AM

Previous topic - Next topic

demetrioussharpe

Hello all,

I have been trying to build C::B on FreeBSD for a few months, with no success. Here is my ./configure command:

./configure --with-wx-config=/usr/local/bin/wxgtk2u-3.0-config --with-boost-libdir=/usr/local/lib/ --includedir=/usr/local/include/ --with-contrib-plugins=all

The point is to build it with wxgtk 3.0 to avoid a very nasty bug. However, regardless of which version of C::B I attempt to build, I always run into the problem of wxPdfDocument failing to compile 'src/pdffontmanager.cpp'. For some reason, pdffontmanager.cpp can't find 'fontconfig/fontconfig.h', even though the Makefile has the correct include directory to find 'fontconfig'. The preprocessors seem to be looking for wxgtk 2.0. Has anyone successfully built everything for wxgtk 3.0? I really need some help, here. Here's my pastebin:

https://pastebin.com/jESNHBw0

stahta01

Quote__WXGTK20__    GTK+ 2.0 or higher

You wish to use wxGTK version 3.0 instead of 2.8, correct?
Or do you mean you want to use GTK 3 instead of GTK 2?

What is the full path to 'fontconfig/fontconfig.h'?

Edit: Found what may be the upstream source of wxPdfDocument https://utelle.github.io/wxpdfdoc/

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

oBFusCATed

It will be good if you can post the full build log. The thing you've posted is not enough to resolve the problem.
CB builds fine on Linux and I think wxpdfdocument builds fine on OSX, too (which is closer to a BSD than linux).
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

demetrioussharpe

Quote from: stahta01 on December 02, 2017, 08:19:57 AM
You wish to use wxGTK version 3.0 instead of 2.8, correct?

Correct

Quote
What is the full path to 'fontconfig/fontconfig.h'?

/usr/local/include/fontconfig/fontconfig.h

Quote
Edit: Found what may be the upstream source of wxPdfDocument https://utelle.github.io/wxpdfdoc/

I'll give it a look.

demetrioussharpe

Quote from: oBFusCATed on December 02, 2017, 11:37:01 AM
It will be good if you can post the full build log.The thing you've posted is not enough to resolve the problem.

Assuming that C::B creates a build log, where would I find it? I ask because the majority of the build info seems to be too big for the terminal to contain it all.

Quote
CB builds fine on Linux and I think wxpdfdocument builds fine on OSX, too (which is closer to a BSD than linux).

I'm not sure how well stock C::B compiles on FreeBSD. However, the stock version that's automatically built for ports & packages suffers from bug 348 (https://sourceforge.net/p/codeblocks/tickets/348/). Since the suggested fix is to build C::B for wx 3.0, that's what I'm attempting to do. I'm under the assumption that wxgtk 3.0 is wx 3.0. I hope that I'm not in error here. Either way, the build is not working.

BlueHazzard

Assuming that C::B creates a build log, where would I find it? I ask because the majority of the build info seems to be too big for the terminal to contain it all.
if you are building it over terminal the ?stream? ">" operator will generate you a log
make > build.log


oBFusCATed

I don't see the error messages there...

What version are you building?
Why is fontconfig in /usr/local/? On most systems it is not in the default search paths and it is possible that we ignore --includedir=/usr/local/include/.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

BlueHazzard

Quote from: demetrioussharpe on December 05, 2017, 08:17:15 PM
The log is huge, so I had to split it up.
Better would be to zip, gz or 7zip it and upload it here.

Quote from: oBFusCATed on December 05, 2017, 08:24:25 PM
I don't see the error messages there...
Are the errors from make files put into the stderr stream?
[EDIT:] gcc puts the errors to the error stream, so you have to redirect this stream also to a file..

if so you have to modify your command and store also the error stream:
make > build.log 2> error.log
or put all in one file
make > build.log 2>&1

Thank you for your collaboration!

PS.: For more information on streams: https://en.wikibooks.org/wiki/Bourne_Shell_Scripting/Files_and_streams

demetrioussharpe

Quote from: oBFusCATed on December 05, 2017, 08:24:25 PM
I don't see the error messages there...

In the third pastebin, you should see "src/pdffontmanager.cpp:51:12: fatal error: 'fontconfig/fontconfig.h' file not found".

Quote
What version are you building?

17.XX
Quote
Why is fontconfig in /usr/local/? On most systems it is not in the default search paths and it is possible that we ignore --includedir=/usr/local/include/.

GhostBSD is a derivative of FreeBSD. I can only assume that it's in "/usr/local/include" because that's where FreeBSD puts it. However, you know what they say about assumptions. Why ignore "--includedir" while publishing it as a configure option?

stahta01

Quote from: demetrioussharpe on December 06, 2017, 01:44:58 AM
Quote from: oBFusCATed on December 05, 2017, 08:24:25 PM
I don't see the error messages there...

In the third pastebin, you should see "src/pdffontmanager.cpp:51:12: fatal error: 'fontconfig/fontconfig.h' file not found".

Quote
What version are you building?

17.XX
Quote
Why is fontconfig in /usr/local/? On most systems it is not in the default search paths and it is possible that we ignore --includedir=/usr/local/include/.

GhostBSD is a derivative of FreeBSD. I can only assume that it's in "/usr/local/include" because that's where FreeBSD puts it. However, you know what they say about assumptions. Why ignore "--includedir" while publishing it as a configure option?

Has anyone tested the "--includedir" option in CB configure lately; I did NOT know it existed.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

demetrioussharpe

Quote from: BlueHazzard on December 05, 2017, 11:04:50 PM
Better would be to zip, gz or 7zip it and upload it here.

I'll do that next time.

Quote
if so you have to modify your command and store also the error stream:
make > build.log 2> error.log
or put all in one file
make > build.log 2>&1

I received an error while attempting to use both of those commands:  Ambiguous output redirect.
I now realize that FreeBSD (& derivatives) use CSH as the shell, so I'm waiting on the next build attempt to finish.

demetrioussharpe

Quote from: BlueHazzard on December 05, 2017, 11:04:50 PM
Thank you for your collaboration!

Are most newcomers not collaborative? I'm just happy that you all are willing to help me on this. I tried in IRC (a few months ago) and couldn't get much help. I appreciate every one of you for helping me!

demetrioussharpe

This time, I build with redirection using this:  make |& cat > cb_17_xx_build.log

This command redirects both stdout & stderr into the build log. The log's text size is 6.9kB.

demetrioussharpe

In the Makefile for xcPdfDocument ("/home/adsharpesr/huge/tools/development/ide/release-17.xx/src/plugins/contrib/source_exporter/wxPdfDocument/Makefile"), on line 251, there's this:

CB_FONTCONFIG_CFLAGS = -I/usr/local/include -I/usr/local/include/freetype2

I would imagine that it should be able to find "/usr/local/include/fontconfig/fontconfig.h".