ERROR: Problem encountered: need to link LibOS against a PAL library, but no PAL version is enabled

12 views
Skip to first unread message

Saikat Mukhopadhyay

unread,
Apr 18, 2024, 12:54:32 PMApr 18
to Gramine Users
Hello Everyone,

I was trying to download and compile gramine in Ubuntu 22.04

Steps I followed:-

1. sudo apt-get install -y build-essential autoconf bison gawk nasm ninja-build pkg-config python3 python3-click python3-jinja2 python3-pip python3-pyelftools wget libunwind8 musl-tools python3-pytest 

2. sudo python3 -m pip install 'meson>=0.56' 'tomli>=1.1.0' 'tomli-w>=0.4.0' 

3. git clone --depth 1 --branch v1.6 https://github.com/gramineproject/gramine.git 

4. cd gramine
5. meson -Ddcap=enabled build 

It's throwing me error like this:-

libos/src/meson.build:8:4: ERROR: Problem encountered: need to link LibOS against a PAL library, but no PAL version is enabled 

Can anyone suggest to me how to fix this issue?

Regards
Saikat

Wojtek Porczyk

unread,
Apr 22, 2024, 3:21:18 AMApr 22
to Saikat Mukhopadhyay, Gramine Users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On Thu, Apr 18, 2024 at 09:54:32AM -0700, Saikat Mukhopadhyay wrote:
>[...]
> It's throwing me error like this:-
>
> * libos/src/meson.build:8:4: ERROR: Problem encountered: need to link LibOS
> against a PAL library, but no PAL version is enabled *
>
> Can anyone suggest to me how to fix this issue?

You need at least one of -Dsgx=enabled and/or -Ddirect=enabled.
(Technically -Dskeleton=enabled would also suffice, but that won't give you
usable PAL, so don't use it).


- --
pozdrawiam / best regards
Wojtek Porczyk
Gramine / Invisible Things Lab

I do not fear computers,
I fear lack of them.
-- Isaac Asimov
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEaO0VFfpr0tEF6hYkv2vZMhA6I1EFAmYmD+cACgkQv2vZMhA6
I1HZ6Q//W4wkUJnL/v+19mRGgMoQEmmWTz0/LXWjARWEP1RKlT5rKrUjPQeUZ2om
WLKq9rnrvmccAoDw37wWwnBnuF6r3cj24j1We7jC1PXDKptz/F2q5MCUwB77tmwg
3rvYE+dZzmduQilt5cdJnf6LTgNs4HHvf5nWp4xcQy3dZdZbXwOSozXOtdG/u93M
sjujApSvgGPSqzXhKdq7FPTfDTa3yBOzXjH9JRz5oZ7h8C4+AarfiB6mVkZo1nS5
j00/U9K5xzido5jOlBPN5Z+L5+l0x9XuBi1J9FyJVrfNSLYW+ZZdS8qmbA/W20hN
3J8M30edegZxElT98mfIUOLko6cQntQlbboMnLfm4Q7z837ExRGKy/iMIQSRnK5S
sTfnuCODqEDq+QBs5a0eC/aO8XEjXDLm9YplXCJcz4LvR35VK0O4+2Jlu/lFdJXD
PEchUDKFbaKY8RkL1nPLOaUysklsBoRHCUnUOnwbdAI4CyBD2g/vmr69J3YpeXrx
CJt3KCoDUc6mfjHgZOwWFYT3sRW3mtCsMzyNWlJk8FfKS1UOJ5beQ63/sU9CqB7H
egsCJP/rKVg8a2QQTFsSLHrwBrWPW+oIgD0j8FVfv4hEIPXue6k9+XpIfmnXTRSv
oQVsrgsqCFSQw6PO9cTqB78ksG1wZGt8fMMlQ1a3vUnNdGpG+9g=
=uh91
-----END PGP SIGNATURE-----

Saikat Mukhopadhyay

unread,
Apr 22, 2024, 11:51:07 AMApr 22
to Gramine Users
Thanks,  Wojtek for your reply.

Any suggestions for the next steps?

I am kind of lost. 

This is the assignment that needs to be submitted.

I was thinking about Azure. Any idea experiment in the Azure environment would be helpful. 

Regards
Saikat 

Wojtek Porczyk

unread,
Apr 22, 2024, 1:00:03 PMApr 22
to Saikat Mukhopadhyay, Gramine Users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On Mon, Apr 22, 2024 at 08:51:06AM -0700, Saikat Mukhopadhyay wrote:
> Any suggestions for the next steps?
>
> I am kind of lost.
>
> This is the assignment that needs to be submitted.

I'm not sure what you're trying to do, what's the end goal. If you're learning
Graine, I'd say go try run CI-Examples/helloworld in SGX. When you figure it
out, you'll probably know how to set up your environment.

> I was thinking about Azure. Any idea experiment in the Azure environment
> would be helpful.


- --
pozdrawiam / best regards
Wojtek Porczyk
Gramine / Invisible Things Lab

I do not fear computers,
I fear lack of them.
-- Isaac Asimov
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEaO0VFfpr0tEF6hYkv2vZMhA6I1EFAmYml4wACgkQv2vZMhA6
I1EiqxAAnmpw6vp8hTzeelqKJBDi8HhhZTp51tW2/pWs+rvJcrU96E+xBQTBbffZ
TbLcBwFrnqUDL66biA1GMpQABVp4PLmRuCaUfL5zwwk4m73M2az0ZzOk7hWtXPBg
5+1kRBG6G8ngmqBnBGRN3AfrKsiFwXsL007n8PQoNXP3Ttgn+ip1QGlHykgOl3H2
OTXlG31AM9ZrHuscBNEmgY/8evfxv6txqJgSWfFzTAeyorvaf3yRIpYFMAicsvUe
om2cFfQk6iyFut82jVbInXPPzryiART/wpkmta9OW+pHr2IX/GSKvQXK4Uqp3PjK
/upyBiiCzzuNL5/j0x3WtJDl234NC0im6wLOXTF/DFyVyJK7GhVBdkG26AYPO5mv
4fwJmxhn+OslRvPaFrKnc2lcKar4G+LEetjU23fKPIBniB0uwqETf3jmrGzJHDMJ
0FPiAO1S9sL1fvAmd/8mzP+q223Tkpio7rxhrCWd4zRcyVXeXuse1ixK0zndlwk/
YKt092fjlkz50LKF+lxZf20GItloMbV7StnXWQ+Pc5rKJ2+xC5jv0d5suWfDZ1M3
vE4if27Pi0nxpTptskAFMTT2cyEXldKcS1qP9AsocpeCSiNzRvx8Vau6FUJL+7L+
SmydFMMcVrqxsp+9bNunQqeiqbFoVBPElC4a48bqo4mHck3CPpI=
=idwt
-----END PGP SIGNATURE-----

Saikat Mukhopadhyay

unread,
Apr 22, 2024, 6:01:29 PMApr 22
to Gramine Users
Hi  Wojtek,

I understand.
Let me explain in detail what I am trying to accomplish.

We are trying to build a secure system using PyTorch PPML (Privacy-Preserving Machine Learning) applications with Intel SGX and Gramine. 

In our ubuntu system ( 22.04 ) activated SGX enclave and installed gramine. 

3. Then Follow PyTorch PPML Framework Tutorial ( https://gramine.readthedocs.io/en/latest/tutorials/pytorch/index.html )
     In this tutorial, 
      When I run this command, 
cd secret_prov_pf 
./server_dcap ../files/wrap_key & 
 I am getting this error, 


If this works, then I plan to test gramine-sgx ./client So my target to accomplish this is below:-

example under
  1. ra-tls-secret-prov/secret_prov_pf

  • Secret Provisioning flows, ECDSA-based (DCAP) attestation:
make app dcap RA_TYPE=dcap # test encrypted files client (other examples can be tested similarly) cd secret_prov_pf ./server_dcap wrap_key & gramine-sgx ./client kill %%

* I checked port 4433 not occupied by any other program.

If anyone accomplishes this, please let me know or guide me.

Regards
Saikat
Message has been deleted

Saikat Mukhopadhyay

unread,
Apr 22, 2024, 6:11:31 PMApr 22
to Gramine Users
This is the error image
error.png

Saikat Mukhopadhyay

unread,
Apr 22, 2024, 6:16:33 PMApr 22
to Gramine Users

Apart from this, I also tried a different way 'Download and Compile Gramine Within Ubuntu'.
Attaching both files for your reference.  
Hope this will help.
Use PyTorch PPML Framework within Ubuntu.docx
Gramine Compilation Within Ubuntu.docx

Vij, Mona

unread,
Apr 22, 2024, 7:19:19 PMApr 22
to Saikat Mukhopadhyay, Gramine Users

Saikat – BTW I suggest using discussion in gramine github to get faster response. We are trying to move away from mailing list to use of discussion and/or issues.

 

I took a quick look at the error code and looks like you are running into file read/write issues with your wrap-key file. Check the file permissions.

 

Please start a discussion thread describing what you are trying to do and what is failing.

 

 

Thanks

Mona

 

 

 

 

From: gramin...@googlegroups.com <gramin...@googlegroups.com> On Behalf Of Saikat Mukhopadhyay
Sent: Monday, April 22, 2024 3:17 PM
To: Gramine Users <gramin...@googlegroups.com>
Subject: Re: ERROR: Problem encountered: need to link LibOS against a PAL library, but no PAL version is enabled

 


Apart from this, I also tried a different way 'Download and Compile Gramine Within Ubuntu'.

Attaching both files for your reference.  

Hope this will help.

On Monday, April 22, 2024 at 5:11:31 PM UTC-5 Saikat Mukhopadhyay wrote:

This is the error image

On Monday, April 22, 2024 at 5:01:29 PM UTC-5 Saikat Mukhopadhyay wrote:

Hi  Wojtek,

 

I understand.

Let me explain in detail what I am trying to accomplish.

 

We are trying to build a secure system using PyTorch PPML (Privacy-Preserving Machine Learning) applications with Intel SGX and Gramine. 

 

In our ubuntu system ( 22.04 ) activated SGX enclave and installed gramine. 

 

3. Then Follow PyTorch PPML Framework Tutorial ( https://gramine.readthedocs.io/en/latest/tutorials/pytorch/index.html )

     In this tutorial, 

      When I run this command, 

cd secret_prov_pf 

./server_dcap ../files/wrap_key

 I am getting this error, 

If this works, then I plan to test gramine-sgx ./client So my target to accomplish this is below:-

--
You received this message because you are subscribed to the Google Groups "Gramine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gramine-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gramine-users/808bbaa0-bbd8-4c88-8649-dcc5a34af523n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages