Opened 10 years ago

Closed 7 years ago

#46898 closed defect (wontfix)

OpenGTL @0.9.18: universal variant configures improperly and fails to build

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version: 2.3.99
Keywords: Cc:
Port: OpenGTL

Description

I noticed during configure, this message appeared:

-- OpenGTL detected that you use a 32 bit processor.

This is untrue. It correctly identifies my 64-bit processor if I do not use the universal variant.

The build fails with:

/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_OpenGTL/OpenGTL/work/OpenGTL-0.9.18/OpenGTL/GTLCore/MemoryManager_p.cpp:70:28: error: cast from pointer to smaller type 'gtl_ptr' (aka 'unsigned int') loses information
    p = (unsigned char *)( (gtl_ptr )(porig + 16) & (~0xf));                  // insert padding
                           ^~~~~~~~~~~~~~~~~~~~~~
1 error generated.

The build succeeds if I do not use the universal variant.

Attachments (2)

main.log (64.6 KB) - added by ryandesign (Ryan Carsten Schmidt) 10 years ago.
gettext-0.19.4+universal-main.log (2.2 MB) - added by Schamschula (Marius Schamschula) 10 years ago.

Change History (7)

Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: main.log added

comment:1 Changed 10 years ago by Schamschula (Marius Schamschula)

Great Ryan,

Now I've infected one of my Yosemite machines with the +universal virus…

As all my machines are 64 bit, I never use +universal.

That having been said, I tried to recreate the OpenGTL build error indicated by your main.log file, but I never got to this point, as the +universal build of gettext-0.19.4 (using port -dt) failed. See attached log.

Changed 10 years ago by Schamschula (Marius Schamschula)

comment:2 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

I haven't seen that failure before. I see you're using trace mode, which I'm not. Does it work if you don't use trace mode?

comment:3 Changed 10 years ago by Schamschula (Marius Schamschula)

Yeah, dropping trace mode let gettext install. I also had a similar issues with openjade, gtk3, and openjpeg.

To the point, I get the same error. The error message is clear: an unsigned int is a smaller data type as a pointer.

I'm looking at GTLCore/StdTypes.h,

/* Exact-width integer types */
typedef signed char gtl_int8;
typedef signed short gtl_int16;
typedef signed long gtl_int32;
typedef signed long long gtl_int64;
typedef unsigned char gtl_uint8;
typedef unsigned short gtl_uint16;
typedef unsigned long gtl_uint32;
typedef unsigned long long gtl_uint64;

and where gtl_ptr is defined:

#ifdef OPENGTL_32_BITS
typedef gtl_uint32 gtl_ptr;
#else
typedef gtl_uint64 gtl_ptr; 
#endif

Could it be that OPENGTL_32_BITS is somehow being ignored? It should be either a unsigned long gtl_uint32 or a unsigned long long gtl_uint64…

comment:4 Changed 10 years ago by neverpanic (Clemens Lang)

FWIW, I cannot reproduce this issue on Yosemite. The build works just fine for me in trace mode. The log looks like a libtool problem.

comment:5 Changed 7 years ago by Schamschula (Marius Schamschula)

Resolution: wontfix
Status: newclosed

OpenGTL has been removed from MacPorts

Note: See TracTickets for help on using tickets.