www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Building derelict

reply "bioinfornatics" <bioinfornatics fedoraproject.org> writes:
Hi,

That is now some time where i am not try to buld derelict3, 
Currently my build fail with:

derelict/pq/types.d(117): Error: struct derelict.pq.types.PGconn 
unknown size
derelict/pq/types.d(117): Error: struct derelict.pq.types.PGconn 
no size yet for forward reference

Someone know what to do?

thanks
Oct 22 2013
parent reply "David Nadlinger" <code klickverbot.at> writes:
On Tuesday, 22 October 2013 at 22:24:36 UTC, bioinfornatics wrote:
 derelict/pq/types.d(117): Error: struct 
 derelict.pq.types.PGconn unknown size
 derelict/pq/types.d(117): Error: struct 
 derelict.pq.types.PGconn no size yet for forward reference
That's with LDC, right? We definitely need to improve the error message (it should refer to the actual function definition), but I checked the Derelict source a few weeks back and if you grep it for PGconn, you'll find that it is used in a function parameter (for which the actual type is needed for the x86-64 ABI handling code). If you don't need that function, just comment it out. David
Oct 22 2013
parent reply "bioinfornatics" <bioinfornatics fedoraproject.org> writes:
On Tuesday, 22 October 2013 at 23:46:03 UTC, David Nadlinger 
wrote:
 On Tuesday, 22 October 2013 at 22:24:36 UTC, bioinfornatics 
 wrote:
 derelict/pq/types.d(117): Error: struct 
 derelict.pq.types.PGconn unknown size
 derelict/pq/types.d(117): Error: struct 
 derelict.pq.types.PGconn no size yet for forward reference
That's with LDC, right? We definitely need to improve the error message (it should refer to the actual function definition), but I checked the Derelict source a few weeks back and if you grep it for PGconn, you'll find that it is used in a function parameter (for which the actual type is needed for the x86-64 ABI handling code). If you don't need that function, just comment it out. David
yes with ldc. I do this command find -iname '*.d' | xargs grep -Hn PGconn and i see like you that is a alias to a function i do not use this syntay usually so i am not able to understand what is the problem. So i build for both 32 / 64 bits, i think i need it no?
Oct 22 2013
parent "Mike Parker" <aldacron gmail.com> writes:
On Wednesday, 23 October 2013 at 00:59:28 UTC, bioinfornatics 
wrote:

 and i see like you that is a alias to a function i do not use 
 this syntay usually so i am not able to understand what is the 
 problem.
I'm not on my dev box right now, but I took a look at the source at github and found what I'm certain is the cause of the problem. PGConn is an opaque struct, which means instances can only be declared as pointers. However, the declaration of PQsetErrorVerbosity in functions.d incorrectly declared a parameter of type PGConn rather than PGConn*, hence the forward reference error. I've edited the file via the github interface, so I'm not able to attempt a build at the moment and won't be for a few hours yet. But I 99.9% confident all should be well. I was unable to find any other incorrect declarations of PGConn parameters.
Oct 22 2013