[OmniOS-discuss] non-amd64 code depends on amd64 privileged header!

Steffen Kram sk at kram.io
Mon Sep 2 07:40:06 UTC 2013


Hi Henrik,

I've got a running netatalk version in my omnios package repo on http://scott.mathematik.uni-ulm.de, I just compiled version 3.0.5. My build script can be found under https://github.com/stefri/omnios-build/tree/uulm.mawi/build/netatalk, maybe this does help you to get your build running.

Cheers,
Steffen


Am 26.08.2013 um 22:50 schrieb Henrik Johansson <henrikj at henkis.net>:

> It's a bit weird:
> 
> /usr/include/sys/privregs.h includes /usr/include/amd64/sys/privregs.h when __amd64 is defined but while then it suddenly is no longed defined?
> 
> First:
> #if defined(__amd64)
> 
> #include <amd64/sys/privregs.h>
> 
> And right after it bails on:
> #if !defined(__amd64)
> #error  "non-amd64 code depends on amd64 privileged header!"
> 
> Oh well, I try to look at it some more if I find time for it, otherwise it was good that an illumos bug have been filed.
> 
> Regards
> Henrik
> 
> 
> 
> 
> On Aug 26, 2013, at 9:55 PM, Eric Sproul <esproul at omniti.com> wrote:
> 
>> I *think* this may be a general illumos issue, insofar as certain apps
>> may be trying to do something that isn't likely to work properly.
>> 
>> https://www.illumos.org/issues/3803
>> 
>> I looked at the commend from regset.h just above line 420 where
>> privregs.h is included:
>> 
>> /*
>> * The version of privregs.h that is used on implementations that run on
>> * processors that support the AMD64 instruction set is deliberately not
>> * imported here.
>> *
>> * The amd64 'struct regs' definition may -not- compatible with either
>> * 32-bit or 64-bit core file contents, nor with the ucontext.  As a result,
>> * the 'regs' structure cannot be used portably by applications, and should
>> * only be used by the kernel implementation.
>> *
>> * The inclusion of the i386 version of privregs.h allows for some limited
>> * source compatibility with 32-bit applications who expect to use
>> * 'struct regs' to match the context of a 32-bit core file, or a ucontext_t.
>> *
>> * Note that the ucontext_t actually describes the general register in terms
>> * of the gregset_t data type, as described in this file.  Note also
>> * that the core file content is defined by core(4) in terms of data types
>> * defined by procfs -- see proc(4).
>> */
>> #if defined(__i386) && \
>>       (!defined(_KERNEL) && !defined(_XPG4_2) || defined(__EXTENSIONS__))
>> #include <sys/privregs.h>
>> #endif  /* __i386 (!_KERNEL && !_XPG4_2 || __EXTENSIONS__) */
>> 
>> It might help if you built netatalk 64-bit (gcc -m64), but I am by no
>> means a kernel hacker, nor am I familiar enough with netatalk to say
>> for sure.
>> 
>> Eric
>> 
>> On Mon, Aug 26, 2013 at 3:36 PM, Henrik Johansson <henrikj at henkis.net> wrote:
>>> Hello,
>>> 
>>> I am trying OmniOS as a replacement for my OpenIndiana deployment. I  did however get into trouble when compiling netatalk, and based on Google the problem is not limited to netatalk. I am uncertain if this is a generic illumos problem introduced after OpenIndiana stagnated or if it is something unique to OmniOS.
>>> 
>>> Here it is:
>>> gmake[3]: Entering directory `/zpool01/build/netatalk/netatalk-3.0.5/etc/uams'
>>> CC       uams_guest.lo
>>> In file included from /usr/include/sys/regset.h:420:0,
>>>                from /usr/include/sys/ucontext.h:36,
>>>                from /usr/include/sys/signal.h:245,
>>>                from /usr/include/sys/procset.h:42,
>>>                from /usr/include/sys/wait.h:43,
>>>                from /usr/include/stdlib.h:38,
>>>                from uams_guest.c:11:
>>> /usr/include/amd64/sys/privregs.h:42:2: error: #error "non-amd64 code depends on amd64 privileged header!"
>>> 
>>> This was using GCC 4.7 but I get the same error with 4.4. If i remove the check from the privregs.h header everything seems to compile fine.
>>> 
>>> Regards
>>> Henrik
>>> _______________________________________________
>>> OmniOS-discuss mailing list
>>> OmniOS-discuss at lists.omniti.com
>>> http://lists.omniti.com/mailman/listinfo/omnios-discuss
> 
> _______________________________________________
> OmniOS-discuss mailing list
> OmniOS-discuss at lists.omniti.com
> http://lists.omniti.com/mailman/listinfo/omnios-discuss
> 



More information about the OmniOS-discuss mailing list