Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

While doing make getting "Permission denied" error... #1262

Closed
rockamble opened this issue Dec 21, 2017 · 4 comments
Closed

While doing make getting "Permission denied" error... #1262

rockamble opened this issue Dec 21, 2017 · 4 comments

Comments

@rockamble
Copy link

rockamble commented Dec 21, 2017

Hi Team,

I am facing build error while doing sonic build,
Logs are given below

rohit123@labuser:/home/rohit/mlnx_build/sonic-buildimage$ sudo make
SONiC Build System

Build Configuration
"CONFIGURED_PLATFORM"             : "mellanox"
"SONIC_CONFIG_PRINT_DEPENDENCIES" : ""
"SONIC_CONFIG_BUILD_JOBS"         : "1"
"SONIC_CONFIG_MAKE_JOBS"          : "4"
"DEFAULT_USERNAME"                : "admin"
"DEFAULT_PASSWORD"                : "YourPaSsWoRd"
"ENABLE_DHCP_GRAPH_SERVICE"       : ""
"SHUTDOWN_BGP_ON_START"           : ""
"SONIC_CONFIG_DEBUG"              : ""
"ROUTING_STACK"                   : "quagga"
"ENABLE_SYNCD_RPC"                : ""
"ENABLE_ORGANIZATION_EXTENSIONS"  : "y"

[ FAIL LOG START ] [ target/debs/sonic-device-data_1.0-1_all.deb ]
make[1]: Entering directory '/sonic/src/sonic-device-data'
pushd ./src
# Remove any stale data
sudo rm -rf ./device
# Create a new dir and copy all ONIE-platform-string-named dirs into it
mkdir ./device
sudo chmod 777 -R ./device
cp -r ../../../device/*/* ./device/
sudo chmod 777 -R ./device
# Build the package

sudo dpkg-buildpackage -rfakeroot -b -us -uc
popd
sudo mv sonic-device-data_1.0-1_all.deb /sonic/target/debs/
/sonic/src/sonic-device-data/src /sonic/src/sonic-device-data
dpkg-buildpackage: warning: using a gain-root-command while being root
dpkg-buildpackage: source package sonic-device-data
dpkg-buildpackage: source version 1.0-1
dpkg-buildpackage: source distribution UNRELEASED
dpkg-buildpackage: source changed by Joe LeVeque <jolevequ@microsoft.com>
 dpkg-source --before-build src
dpkg-buildpackage: host architecture amd64
 fakeroot debian/rules clean
dh clean
   dh_testdir
   dh_auto_clean
   dh_clean
 debian/rules build
dh build
   dh_testdir
   dh_auto_configure
   dh_auto_build
   dh_auto_test
 fakeroot debian/rules binary
dh binary
   dh_testroot
   dh_prep
   dh_auto_install
   dh_install
/sonic/src/sonic-device-data/src/debian/install: 1: /sonic/src/sonic-device-data/src/debian/install: device/: Permission denied
dh_install: problem reading debian/install: 
debian/rules:6: recipe for target 'binary' failed
make: *** [binary] Error 126
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
Makefile:8: recipe for target '/sonic/target/debs/sonic-device-data_1.0-1_all.deb' failed
make[1]: *** [/sonic/target/debs/sonic-device-data_1.0-1_all.deb] Error 2
make[1]: Leaving directory '/sonic/src/sonic-device-data'
[  FAIL LOG END  ] [ target/debs/sonic-device-data_1.0-1_all.deb ]
slave.mk:180: recipe for target 'target/debs/sonic-device-data_1.0-1_all.deb' failed
make: *** [target/debs/sonic-device-data_1.0-1_all.deb] Error 1
Makefile:74: recipe for target 'all' failed
make: *** [all] Error 2
rohit123@labuser:/home/rohit/mlnx_build/sonic-buildimage$ 
@jleveque
Copy link
Contributor

jleveque commented Dec 21, 2017

FYI, I edited your comment to make the output more readable.

I am unable to reproduce this issue. It appears there is a permissions issue with the device/ directory in your environment.

I notice you're calling make as root (via sudo). What is your reasoning here? Have you tried building without sudo?

@rockamble
Copy link
Author

Thanks for your reply.

What is your reasoning here?

since we have logged in with non root user, we have give sudo.
Have you tried building without sudo?
Yes, we have tried without sudo, but still getting same error.

It appears there is a permissions issue with the device/ directory in your environment.

we have given full permission to device/ directory, but still face this issue.

BTW, do we need to set any build environment for build this sonic image ?

@lguohan lguohan closed this as completed Feb 15, 2018
@lockless
Copy link

lockless commented Apr 8, 2018

@rockamble @lguohan @jleveque
did this issue solved?

Logs:

dp@Ubuntu:/home/skunlin/SONIC/sonic$ make target/debs/sonic-device-data_1.0-1_all.deb KEEP_SLAVE_ON=yes

SONiC Build System

Build Configuration
"CONFIGURED_PLATFORM"             : "broadcom"
"SONIC_CONFIG_PRINT_DEPENDENCIES" : ""
"SONIC_CONFIG_BUILD_JOBS"         : "1"
"SONIC_CONFIG_MAKE_JOBS"          : "6"
"DEFAULT_USERNAME"                : "admin"
"DEFAULT_PASSWORD"                : "YourPaSsWoRd"
"ENABLE_DHCP_GRAPH_SERVICE"       : ""
"SHUTDOWN_BGP_ON_START"           : ""
"SONIC_CONFIG_DEBUG"              : ""
"ROUTING_STACK"                   : "quagga"
"ENABLE_SYNCD_RPC"                : ""
"ENABLE_ORGANIZATION_EXTENSIONS"  : "y"

slave.mk:248: warning: overriding recipe for target 'target/debs/libsaibcm-dev_3.0.3.3-1_amd64.deb'
slave.mk:145: warning: ignoring old recipe for target 'target/debs/libsaibcm-dev_3.0.3.3-1_amd64.deb'
slave.mk:281: target 'target/debs/libsaibcm-dev_3.0.3.3-1_amd64.deb-install' given more than once in the same rule
slave.mk:479: target 'target/debs/libsaibcm-dev_3.0.3.3-1_amd64.deb-clean' given more than once in the same rule
[ FAIL LOG START ] [ target/debs/sonic-device-data_1.0-1_all.deb ]
make[1]: Entering directory '/sonic/src/sonic-device-data'
pushd ./src
# Remove any stale data
rm -rf ./device
# Create a new dir and copy all ONIE-platform-string-named dirs into it
mkdir ./device
cp -r ../../../device/*/* ./device/
# Build the package
dpkg-buildpackage -rfakeroot -b -us -uc
popd
mv sonic-device-data_1.0-1_all.deb /sonic/target/debs/
/sonic/src/sonic-device-data/src /sonic/src/sonic-device-data
dpkg-buildpackage: source package sonic-device-data
dpkg-buildpackage: source version 1.0-1
dpkg-buildpackage: source distribution UNRELEASED
dpkg-buildpackage: source changed by Joe LeVeque <jolevequ@microsoft.com>
 dpkg-source --before-build src
dpkg-buildpackage: host architecture amd64
 fakeroot debian/rules clean
make[2]: Entering directory '/sonic/src/sonic-device-data/src'
dh clean
   dh_testdir
   dh_auto_clean
   dh_clean
make[2]: Leaving directory '/sonic/src/sonic-device-data/src'
 debian/rules build
make[2]: Entering directory '/sonic/src/sonic-device-data/src'
dh build
   dh_testdir
   dh_auto_configure
   dh_auto_build
   dh_auto_test
make[2]: Leaving directory '/sonic/src/sonic-device-data/src'
 fakeroot debian/rules binary
make[2]: Entering directory '/sonic/src/sonic-device-data/src'
dh binary
   dh_testroot
   dh_prep
   dh_auto_install
   dh_install
/sonic/src/sonic-device-data/src/debian/install: 1: /sonic/src/sonic-device-data/src/debian/install: device/: Permission denied
dh_install: problem reading debian/install: 
debian/rules:6: recipe for target 'binary' failed
make[2]: *** [binary] Error 126
make[2]: Leaving directory '/sonic/src/sonic-device-data/src'
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
Makefile:8: recipe for target '/sonic/target/debs/sonic-device-data_1.0-1_all.deb' failed
make[1]: *** [/sonic/target/debs/sonic-device-data_1.0-1_all.deb] Error 2
make[1]: Leaving directory '/sonic/src/sonic-device-data'
[  FAIL LOG END  ] [ target/debs/sonic-device-data_1.0-1_all.deb ]
slave.mk:178: recipe for target 'target/debs/sonic-device-data_1.0-1_all.deb' failed
make: *** [target/debs/sonic-device-data_1.0-1_all.deb] Error 1

@ghost
Copy link

ghost commented Mar 29, 2019

Hello, I see the issue is closed, but what's the solution ? I am facing the same issue.thx
@lguohan @rockamble

theasianpianist pushed a commit to theasianpianist/sonic-buildimage that referenced this issue Feb 5, 2022
* Fix obvious syntax errors
* Remove unused var
yxieca pushed a commit that referenced this issue Jul 25, 2023
This submodule update needs to be manually done due to build changes
done in the sairedis submodule. Specifically, Debian build profiles are
now being used instead of dpkg build targets, and dbgsym packages are
being used instead of dbg packages. Because of this, there needs to be
changes on the sonic-buildimage side for this.

This submodule update brings in the following changes:

ce8f642 [vs] Use boost join to concatenate switch types in config (#1266)
d6055a2 [vslib]: Temporaily map DPU switch type to NVDA_MBF2H536C (#1259)
e1cdb4d [CodeQL]: Use dependencies with relevant versions in azp template. (#1262)
c08f9a2 [CI]: Fix collect log error in azp template. (#1260)
eed856c [CodeQL]: Fix syncd compilation in azp template. (#1261)
a3f1f1a Reland 'Make changes to building and packaging sairedis (#1116)' (#1194)

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
mssonicbld added a commit that referenced this issue Jul 28, 2023
…tically (#15698)

#### Why I did it
src/sonic-sairedis
```
* ce8f642 - (HEAD -> master, origin/master, origin/HEAD) [vs] Use boost join to concatenate switch types in config (#1266) (6 days ago) [Kamil Cudnik]
* d6055a2 - [vslib]: Temporaily map DPU switch type to NVDA_MBF2H536C (#1259) (13 days ago) [prabhataravind]
* e1cdb4d - [CodeQL]: Use dependencies with relevant versions in azp template. (#1262) (3 weeks ago) [Nazarii Hnydyn]
* c08f9a2 - [CI]: Fix collect log error in azp template. (#1260) (3 weeks ago) [Nazarii Hnydyn]
* eed856c - [CodeQL]: Fix syncd compilation in azp template. (#1261) (3 weeks ago) [Nazarii Hnydyn]
* a3f1f1a - Reland 'Make changes to building and packaging sairedis (#1116)' (#1194) (3 weeks ago) [Saikrishna Arcot]
```
#### How I did it
#### How to verify it
#### Description for the changelog
saiarcot895 added a commit to saiarcot895/sonic-buildimage that referenced this issue Aug 7, 2023
This submodule update needs to be manually done due to build changes
done in the sairedis submodule. Specifically, Debian build profiles are
now being used instead of dpkg build targets, and dbgsym packages are
being used instead of dbg packages. Because of this, there needs to be
changes on the sonic-buildimage side for this.

This is a reland of sonic-net#15720, which was reverted in sonic-net#15995 due to the RPC
package build failing. That failure has since been fixed, and the
PR pipeline has been updated to build the RPC package so that this is
checked at the PR stage.

This submodule update brings in the following changes:

```
4dbdb21 Fix RPC package build failure due to shell syntax issue (sonic-net#1268)
588d596 Make sure new binaries replace existing binaries in docker-sonic-vs (sonic-net#1269)
ce8f642 [vs] Use boost join to concatenate switch types in config (sonic-net#1266)
d6055a2 [vslib]: Temporaily map DPU switch type to NVDA_MBF2H536C (sonic-net#1259)
e1cdb4d [CodeQL]: Use dependencies with relevant versions in azp template. (sonic-net#1262)
c08f9a2 [CI]: Fix collect log error in azp template. (sonic-net#1260)
eed856c [CodeQL]: Fix syncd compilation in azp template. (sonic-net#1261)
a3f1f1a Reland 'Make changes to building and packaging sairedis (sonic-net#1116)' (sonic-net#1194)
```

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
yxieca pushed a commit that referenced this issue Aug 11, 2023
* Update sairedis submodule

This submodule update needs to be manually done due to build changes
done in the sairedis submodule. Specifically, Debian build profiles are
now being used instead of dpkg build targets, and dbgsym packages are
being used instead of dbg packages. Because of this, there needs to be
changes on the sonic-buildimage side for this.

This is a reland of #15720, which was reverted in #15995 due to the RPC
package build failing. That failure has since been fixed, and the
PR pipeline has been updated to build the RPC package so that this is
checked at the PR stage.

This submodule update brings in the following changes:

```
4dbdb21 Fix RPC package build failure due to shell syntax issue (#1268)
588d596 Make sure new binaries replace existing binaries in docker-sonic-vs (#1269)
ce8f642 [vs] Use boost join to concatenate switch types in config (#1266)
d6055a2 [vslib]: Temporaily map DPU switch type to NVDA_MBF2H536C (#1259)
e1cdb4d [CodeQL]: Use dependencies with relevant versions in azp template. (#1262)
c08f9a2 [CI]: Fix collect log error in azp template. (#1260)
eed856c [CodeQL]: Fix syncd compilation in azp template. (#1261)
a3f1f1a Reland 'Make changes to building and packaging sairedis (#1116)' (#1194)
```

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>

* Update sairedis submodule with the fix for the RPC package build

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>

---------

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
mssonicbld added a commit that referenced this issue Aug 12, 2023
…tically (#16004)

#### Why I did it
src/sonic-sairedis
```
* eb24302 - (HEAD -> master, origin/master, origin/HEAD) Build both the regular and RPC version when the RPC profile is enabled (#1273) (28 hours ago) [Saikrishna Arcot]
* 9e855c2 - [FEC] Adding support for vs testing for SAI_PORT_ATTR_AUTO_NEG_FEC_MODE_OVERRIDE (#1271) (2 days ago) [Sudharsan Dhamal Gopalarathnam]
* 4dbdb21 - Fix RPC package build failure due to shell syntax issue (#1268) (10 days ago) [Saikrishna Arcot]
* 588d596 - Make sure new binaries replace existing binaries in docker-sonic-vs (#1269) (11 days ago) [Saikrishna Arcot]
* ce8f642 - [vs] Use boost join to concatenate switch types in config (#1266) (3 weeks ago) [Kamil Cudnik]
* d6055a2 - [vslib]: Temporaily map DPU switch type to NVDA_MBF2H536C (#1259) (4 weeks ago) [prabhataravind]
* e1cdb4d - [CodeQL]: Use dependencies with relevant versions in azp template. (#1262) (5 weeks ago) [Nazarii Hnydyn]
* c08f9a2 - [CI]: Fix collect log error in azp template. (#1260) (5 weeks ago) [Nazarii Hnydyn]
* eed856c - [CodeQL]: Fix syncd compilation in azp template. (#1261) (5 weeks ago) [Nazarii Hnydyn]
* a3f1f1a - Reland 'Make changes to building and packaging sairedis (#1116)' (#1194) (6 weeks ago) [Saikrishna Arcot]
```
#### How I did it
#### How to verify it
#### Description for the changelog
sonic-otn pushed a commit to sonic-otn/sonic-buildimage that referenced this issue Sep 20, 2023
This submodule update needs to be manually done due to build changes
done in the sairedis submodule. Specifically, Debian build profiles are
now being used instead of dpkg build targets, and dbgsym packages are
being used instead of dbg packages. Because of this, there needs to be
changes on the sonic-buildimage side for this.

This submodule update brings in the following changes:

ce8f642 [vs] Use boost join to concatenate switch types in config (sonic-net#1266)
d6055a2 [vslib]: Temporaily map DPU switch type to NVDA_MBF2H536C (sonic-net#1259)
e1cdb4d [CodeQL]: Use dependencies with relevant versions in azp template. (sonic-net#1262)
c08f9a2 [CI]: Fix collect log error in azp template. (sonic-net#1260)
eed856c [CodeQL]: Fix syncd compilation in azp template. (sonic-net#1261)
a3f1f1a Reland 'Make changes to building and packaging sairedis (sonic-net#1116)' (sonic-net#1194)

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
sonic-otn pushed a commit to sonic-otn/sonic-buildimage that referenced this issue Sep 20, 2023
* Update sairedis submodule

This submodule update needs to be manually done due to build changes
done in the sairedis submodule. Specifically, Debian build profiles are
now being used instead of dpkg build targets, and dbgsym packages are
being used instead of dbg packages. Because of this, there needs to be
changes on the sonic-buildimage side for this.

This is a reland of sonic-net#15720, which was reverted in sonic-net#15995 due to the RPC
package build failing. That failure has since been fixed, and the
PR pipeline has been updated to build the RPC package so that this is
checked at the PR stage.

This submodule update brings in the following changes:

```
4dbdb21 Fix RPC package build failure due to shell syntax issue (sonic-net#1268)
588d596 Make sure new binaries replace existing binaries in docker-sonic-vs (sonic-net#1269)
ce8f642 [vs] Use boost join to concatenate switch types in config (sonic-net#1266)
d6055a2 [vslib]: Temporaily map DPU switch type to NVDA_MBF2H536C (sonic-net#1259)
e1cdb4d [CodeQL]: Use dependencies with relevant versions in azp template. (sonic-net#1262)
c08f9a2 [CI]: Fix collect log error in azp template. (sonic-net#1260)
eed856c [CodeQL]: Fix syncd compilation in azp template. (sonic-net#1261)
a3f1f1a Reland 'Make changes to building and packaging sairedis (sonic-net#1116)' (sonic-net#1194)
```

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>

* Update sairedis submodule with the fix for the RPC package build

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>

---------

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants