Hi I have just started to program in Rust.
Here is my build.rs
use std::fs::{File, self};
use std::io::Write;
use std::os::unix::prelude::PermissionsExt;
use std::env;
use std::path::{Path, PathBuf};
fn main() {
let out_dir = env::var_os("CARGO_MANIFEST_DIR").unwrap();
let dest_path: PathBuf = Path::new(&out_dir).join("target/release/Settings.toml");
println!("{:?}", dest_path.as_os_str());
let f = File::create(dest_path);
f.as_ref()
.unwrap()
.write_all("largest_number = 7".as_bytes())
.unwrap();
set_permissions(f);
}
fn set_permissions(f: Result<File, std::io::Error>) {
f.as_ref()
.unwrap()
.metadata()
.unwrap()
.permissions()
.set_mode(0x777);
}
The problem I am having is even after executing cargo build the permissions of the Settings.toml file is not 777.
root#xxxx:~/code/rust/addition# ls -larth target/release/
total 5.3M
drwxrwxrwx 2 root root 4.0K Feb 14 19:16 incremental
drwxrwxrwx 2 root root 4.0K Feb 14 19:16 examples
-rwxrwxrwx 1 root root 0 Feb 14 19:16 .cargo-lock
drwxrwxrwx 4 root root 4.0K Feb 14 19:16 ..
-rwxrwxrwx 1 root root 233 Feb 14 22:32 addition.d
drwxrwxrwx 2 root root 20K Feb 16 20:31 deps
-rwxrwxr-x 2 vinay vinay 5.2M Feb 16 20:31 addition
drwxrwxrwx 29 root root 4.0K Feb 16 22:02 build
drwxrwxrwx 90 root root 4.0K Feb 16 22:02 .fingerprint
drwxrwxrwx 7 root root 4.0K Feb 16 22:58 .
-rw-r--r-- 1 root root 18 Feb 16 23:17 Settings.toml
root#xxxx:~/code/rust/addition#
From Permissions::set_readonly() docs (the same apply for set_mode()):
This operation does not modify the files attributes. This only changes the in-memory value of these attributes for this Permissions instance. To modify the files attributes use the set_permissions function which commits these attribute changes to the file.
Well your code does not change the permissions on the file but only the in memory representation of them. To set the permissions of a file you have to call it's set_permissions method:
fn set_permissions(f: Result<File, std::io::Error>) {
let perm = Permissions::from_mode(0o777);
f.as_ref().unwrap().set_permissions(perm).unwrap();
}
Note: I also changed from hexadecimal to octal numbers which is very likely what you really want.
Related
I am working on a Flask app that processes input and creates a file at the end. I am trying to download that file using send_to_directory().
Route:
#app.route('/file-diff', methods=['GET','POST'])
def file_diff():
if request.method == "POST":
results = process_request(ip_a=request.form.get("ip_a"), chk1=request.form.get("chk1"), ip_b=request.form.get("ip_b"), chk2=request.form.get("chk2"))
path,filename = os.path.split(results)
print(app.config["DOWNLOADS"])
# outputs - /cache/app_bd/app/downloads
print("Path to file = {}".format(path))
# outputs - Path to file = /cache/app_bd/app/downloads
print("Filename = {}".format(filename))
# outputs - Filename = diff_results
try:
return send_from_directory(directory=app.config["DOWNLOADS"], path=filename, as_attachment=True)
except FileNotFoundError:
abort(404)
return redirect(request.url)
return render_template("file_diff.html")
Directory Structure:
:/cache/app_bd# ls -lR
drwxr-xr-x 7 root root 4096 Apr 13 13:00 app
-rw-r--r-- 1 root root 783 Apr 13 16:29 config.py
-rw-r--r-- 1 root root 174 Apr 11 16:22 requirements.txt
-rw-r--r-- 1 root root 92 Apr 13 12:48 run.py
./app:
-rw-r--r-- 1 root root 309 Apr 13 12:14 __init__.py
-rw-r--r-- 1 root root 2024 Apr 13 15:35 file_utils.py
drwxr-xr-x 2 root root 4096 Apr 13 13:02 downloads
drwxr-xr-x 2 root root 4096 Apr 12 16:13 scripts
drwxr-xr-x 6 root root 4096 Apr 13 13:00 static
drwxr-xr-x 2 root root 4096 Apr 12 16:11 templates
-rw-r--r-- 1 root root 1717 Apr 13 17:05 views.py
./app/downloads:
-rw-r--r-- 1 root root 85008 Apr 13 17:05 diff_results
The above code works but downloads file_diff.html itself. The expected file to download is diff_results.
What was tried?
Setting path="app/downloads and filename=filename inside send_to_directory()
Setting send_from_directory(app.config["DOWNLOADS"], filename=filename, as_attachment=True)
Setting send_from_directory(app.config["DOWNLOADS"], filename, as_attachment=True)
None of the above changes helped in downloading the correct file (diff_results).
Is it mandatory to have a route like -
#app.route('/download/<filename>', methods = ["GET", "POST"])
def download(filename):
Am I missing something?
I'm unable to apply the following patch from github into my docker container. I get the error can't find file.
https://patch-diff.githubusercontent.com/raw/ManageIQ/manageiq-providers-ansible_tower/pull/267.patch
root#0fec7605d8b9 manageiq-providers-ansible_tower-d5ec9817e49c]# patch < 267.patch
can't find file to patch at input line 16
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|From 36f36d6a9985d8df27ae35cbe13bf47f16309a69 Mon Sep 17 00:00:00 2001
|From: Adam Grare <adam#grare.com>
|Date: Thu, 14 Oct 2021 10:55:39 -0400
|Subject: [PATCH 1/3] Fix merge_extra_vars with nil variables
|
|---
| .../ansible_tower/automation_manager/configuration_script.rb | 2 +-
| .../automation_manager/configuration_workflow.rb | 2 +-
| .../providers/ansible_tower/automation_manager/job.rb | 4 ++--
| 3 files changed, 4 insertions(+), 4 deletions(-)
|
|diff --git a/app/models/manageiq/providers/ansible_tower/automation_manager/configuration_script.rb b/app/models/manageiq/providers/ansible_tower/automation_manager/configuration_script.rb
|index d133a97..83bad07 100644
|--- a/app/models/manageiq/providers/ansible_tower/automation_manager/configuration_script.rb
|+++ b/app/models/manageiq/providers/ansible_tower/automation_manager/configuration_script.rb
--------------------------
File to patch: q
q: No such file or directory
Skip this patch? [y] ^C
The files are inside the following directory
/opt/manageiq/manageiq-gemset/bundler/gems/manageiq-providers-ansible_tower-d5ec9817e49c
I'm trying to apply patch from within this directory. All the files are inside the app directory.
[root#0fec7605d8b9 manageiq-providers-ansible_tower-d5ec9817e49c]# ls -l
total 92
-rw-r--r-- 1 root root 20923 Dec 18 09:28 267.patch
drwxrwxr-x 1 root root 4096 Nov 29 01:44 app
drwxrwxr-x 3 root root 4096 Nov 29 01:44 bin
drwxrwxr-x 2 root root 4096 Nov 29 01:44 bundler.d
-rw-r--r-- 1 root root 5734 Jul 13 18:25 CHANGELOG.md
drwxrwxr-x 2 root root 4096 Nov 29 01:44 config
-rw-r--r-- 1 root root 603 Jul 13 18:25 Gemfile
drwxrwxr-x 5 root root 4096 Nov 29 01:44 lib
-rw-r--r-- 1 root root 11358 Jul 13 18:25 LICENSE.txt
drwxrwxr-x 2 root root 4096 Nov 29 01:44 locale
-rw-r--r-- 1 root root 6630 Jul 13 18:25 manageiq-providers-ansible_tower.gemspec
-rw-r--r-- 1 root root 339 Jul 13 18:25 Rakefile
-rw-r--r-- 1 root root 1735 Jul 13 18:25 README.md
MWE
I have a GitHub Actions workflow that recently stopped working without me making changes. The error:
==> ERROR: /etc/makepkg.conf not found.
Aborting...
This is from running # sudo -Eu builder makepkg --printsrcinfo.
Source
Logs
The order of the logs seem to be wrong but it is correct in an earlier log (possibly due to ls -l having a large output).
The source of this error seems to be libmakepkg/util/config.sh.in:
# Source the config file; fail if it is not found
if [[ -r $MAKEPKG_CONF ]]; then
source_safe "$MAKEPKG_CONF"
else
error "$(gettext "%s not found.")" "$MAKEPKG_CONF"
plainerr "$(gettext "Aborting...")"
exit $E_CONFIG_ERROR
fi
I added the following to my entrypoint script:
echo "Writing SRCINFO..."
# Debug
echo "---"
ls -l /
echo "---"
ls -l /etc
echo "---"
sudo -Eu builder cat /etc/makepkg.conf
echo "---"
sudo -Eu builder /bin/bash -c "[[ -r "/etc/makepkg.conf" ]] && echo 1 || echo 0"
echo "---"
sudo -Eu builder makepkg --printsrcinfo > .SRCINFO
The builder user is created in build.sh:
useradd builder -m
echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
I got:
Setting permissions...
Writing SRCINFO...
---
total 52
lrwxrwxrwx 1 root root 7 Feb 1 19:19 bin -> usr/bin
drwxr-xr-x 2 root root 4096 Jan 19 01:32 boot
drwxr-xr-x 5 root root 340 Feb 7 11:58 dev
-rwxr-xr-x 1 root root 836 Feb 7 11:57 entrypoint.sh
drwxr-xr-x 1 root root 4096 Feb 7 11:58 etc
drwxr-xr-x 6 root root 4096 Feb 7 11:58 github
drwxr-xr-x 1 root root 4096 Feb 7 11:57 home
lrwxrwxrwx 1 root root 7 Feb 1 19:19 lib -> usr/lib
lrwxrwxrwx 1 root root 7 Feb 1 19:19 lib64 -> usr/lib
drwxr-xr-x 2 root root 4096 Jan 19 01:32 mnt
drwxr-xr-x 2 root root 4096 Jan 19 01:32 opt
dr-xr-xr-x 159 root root 0 Feb 7 11:58 proc
drwxr-x--- 2 root root 4096 Jan 19 01:32 root
drwxr-xr-x 1 root root 4096 Feb 7 11:58 run
lrwxrwxrwx 1 root root 7 Feb 1 19:19 sbin -> usr/bin
drwxr-xr-x 4 root root 4096 Feb 1 19:19 srv
dr-xr-xr-x 12 root root 0 Feb 7 11:58 sys
drwxrwxrwt 2 root root 4096 Jan 19 01:32 tmp
drwxr-xr-x 1 root root 4096 Feb 7 11:57 usr
drwxr-xr-x 1 root root 4096 Feb 1 19:19 var
---
total 640
-rw-r--r-- 1 root root 0 Jan 19 01:32 arch-release
drwxr-xr-x 3 root root 4096 Feb 1 19:19 audit
-rw-r--r-- 1 root root 28 Dec 20 18:44 bash.bash_logout
-rw-r--r-- 1 root root 618 Dec 20 18:44 bash.bashrc
-rw-r--r-- 1 root root 447 Dec 2 16:02 bindresvport.blacklist
drwxr-xr-x 2 root root 4096 Dec 16 14:38 binfmt.d
drwxr-xr-x 4 root root 4096 Feb 1 19:19 ca-certificates
-rw------- 1 root root 722 Jan 19 01:32 crypttab
drwxr-xr-x 2 root root 4096 Feb 1 19:19 default
drwxr-xr-x 2 root root 4096 Jan 7 19:51 depmod.d
-rw-r--r-- 1 root root 685 Jan 31 20:31 e2scrub.conf
-rw-r--r-- 1 root root 97 Jan 13 22:50 environment
-rw-r--r-- 1 root root 1362 Jan 20 21:31 ethertypes
-rw-r--r-- 1 root root 126 Jan 19 01:32 fstab
-rw-r--r-- 1 root root 2584 Feb 6 00:09 gai.conf
-rw-r--r-- 1 root root 626 Feb 7 11:57 group
-rw-r--r-- 1 root root 610 Jan 31 00:20 group-
-rw------- 1 root root 558 Feb 7 11:57 gshadow
-rw------- 1 root root 546 Jan 31 00:20 gshadow-
-rw-r--r-- 1 root root 73 Jan 19 01:32 host.conf
-rw-r--r-- 1 root root 13 Feb 7 11:58 hostname
-rw-r--r-- 1 root root 174 Feb 7 11:58 hosts
-rw-r--r-- 1 root root 714 Dec 8 17:48 inputrc
drwxr-xr-x 2 root root 4096 Feb 1 19:19 iproute2
drwxr-xr-x 2 root root 4096 Feb 1 19:19 iptables
-rw-r--r-- 1 root root 20 Jan 19 01:32 issue
drwxr-xr-x 3 root root 4096 Feb 1 19:19 kernel
drwxr-xr-x 2 root root 4096 Jul 7 2020 keyutils
-rw-r--r-- 1 root root 369 Jan 14 00:32 krb5.conf
-rw-r--r-- 1 root root 18096 Feb 7 11:57 ld.so.cache
-rw-r--r-- 1 root root 117 Jan 19 01:32 ld.so.conf
drwxr-xr-x 1 root root 4096 Feb 7 11:57 ld.so.conf.d
-rw-r----- 1 root root 191 Jan 13 22:33 libaudit.conf
drwxr-xr-x 2 root root 4096 Feb 1 19:19 libnl
-rw-r--r-- 1 root root 17 Jan 31 00:19 locale.conf
-rw-r--r-- 1 root root 18 Jan 31 00:19 locale.gen
-rw-r--r-- 1 root root 9984 Feb 6 00:09 locale.gen.pacnew
-rw-r--r-- 1 root root 5645 Sep 7 13:42 login.defs
-rw-r--r-- 1 root root 5792 Jul 1 2020 makepkg.conf
-rw-r--r-- 1 root root 812 Jan 31 20:31 mke2fs.conf
drwxr-xr-x 2 root root 4096 Jan 7 19:51 modprobe.d
drwxr-xr-x 2 root root 4096 Dec 16 14:38 modules-load.d
-rw-r--r-- 1 root root 0 Jan 19 01:32 motd
lrwxrwxrwx 1 root root 12 Feb 7 11:58 mtab -> /proc/mounts
-rw-r--r-- 1 root root 767 Dec 2 16:02 netconfig
-rw-r--r-- 1 root root 2717 Feb 6 00:09 nscd.conf
-rw-r--r-- 1 root root 328 Jan 19 01:32 nsswitch.conf
drwxr-xr-x 1 root root 4096 Feb 7 11:57 openldap
lrwxrwxrwx 1 root root 19 Feb 1 19:19 os-release -> /usr/lib/os-release
-rw-r--r-- 1 root root 3264 Feb 7 11:57 pacman.conf
-rw-r--r-- 1 root root 2883 Jul 1 2020 pacman.conf.pacnew
drwxr-xr-x 1 root root 4096 Feb 7 11:57 pacman.d
drwxr-xr-x 1 root root 4096 Feb 7 11:57 pam.d
-rw-r--r-- 1 root root 744 Feb 7 11:57 passwd
-rw-r--r-- 1 root root 699 Jan 31 00:20 passwd-
drwxr-xr-x 2 root root 4096 Feb 1 19:19 pkcs11
-rw-r--r-- 1 root root 1020 Jan 19 01:32 profile
drwxr-xr-x 1 root root 4096 Feb 7 11:57 profile.d
-rw-r--r-- 1 root root 3171 Jan 3 17:14 protocols
-rw-r--r-- 1 root root 1814 Jul 7 2020 request-key.conf
drwxr-xr-x 2 root root 4096 Jul 7 2020 request-key.d
-rw-r--r-- 1 root root 649 Feb 7 11:58 resolv.conf
-rw-r--r-- 1 root root 1634 Feb 6 00:09 rpc
-rw-r--r-- 1 root root 139 Jan 19 01:32 securetty
drwxr-xr-x 2 root root 4096 Feb 1 19:19 security
-rw-r--r-- 1 root root 297708 Jan 3 17:14 services
-rw------- 1 root root 375 Feb 7 11:57 shadow
-rw------- 1 root root 346 Jan 31 00:20 shadow-
-rw-r--r-- 1 root root 83 Jan 19 01:32 shells
drwxr-xr-x 2 root root 4096 Feb 1 19:19 skel
drwxr-xr-x 5 root root 4096 Feb 1 19:19 ssl
-rw-r--r-- 1 root root 3975 Jan 26 18:34 sudo.conf
-r--r----- 1 root root 3160 Feb 7 11:57 sudoers
drwxr-x--- 2 root root 4096 Jan 26 18:34 sudoers.d
-rw-r--r-- 1 root root 6169 Jan 26 18:34 sudo_logsrvd.conf
drwxr-xr-x 2 root root 4096 Dec 16 14:38 sysctl.d
drwxr-xr-x 1 root root 4096 Feb 7 11:57 systemd
drwxr-xr-x 2 root root 4096 Dec 16 14:38 tmpfiles.d
drwxr-xr-x 1 root root 4096 Feb 7 11:57 udev
drwxr-xr-x 1 root root 4096 Feb 1 19:19 X11
-rw-r--r-- 1 root root 642 May 7 2020 xattr.conf
drwxr-xr-x 1 root root 4096 Feb 1 19:19 xdg
drwxr-xr-x 2 root root 4096 Feb 1 19:19 xinetd.d
---
#!/hint/bash
#
# /etc/makepkg.conf
#
...
SRCEXT='.src.tar.gz'
---
0
---
==> ERROR: /etc/makepkg.conf not found.
Aborting...
(The contents of /etc/makepkg.conf was concatenated.)
I also accidentally did [[ -r "/etc/makepkg.conf" ]] && echo 1 || echo 0 (as root) and I also got 0.
How is it possible that a file is not readable yet I can cat it? I also tried running the exact same commands in a local container and couldn't reproduce this issue, but this has happened every GitHub Actions run since it started.
This makes me think the Actions setup is causing an issue, but nothing seems odd there:
/usr/bin/docker build -t 442333:35a065f0b9f356b32f2852ba2f6b7296 -f "/home/runner/work/visual-studio-code-insiders-arch/visual-studio-code-insiders-arch/./.github/actions/pkg/Dockerfile" "/home/runner/work/visual-studio-code-insiders-arch/visual-studio-code-insiders-arch/.github/actions/pkg"
/usr/bin/docker run --name a065f0b9f356b32f2852ba2f6b7296_baf94b --label 442333 --workdir /github/workspace --rm -e pythonLocation -e LD_LIBRARY_PATH -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/visual-studio-code-insiders-arch/visual-studio-code-insiders-arch":"/github/workspace" 442333:35a065f0b9f356b32f2852ba2f6b7296
Thanks for sharing this. I have precisely the same problems.
I added the following in my Dockerfile
RUN sed -i 's/\tif \[\[ -r $MAKEPKG_CONF \]\]; then/\tif \[\[ -f $MAKEPKG_CONF \]\]; then/' /usr/share/makepkg/util/config.sh
which replaces the check for read permission (-r) for the check whether the file exists and is a regular file (-f).
now my github action gets over this particular location, but fails with the next check:
==> ERROR: You do not have write permission for the directory $BUILDDIR (/tmp/aurutils).
Aborting...
This is not a solution and does not answer what's the underlying issue, but I hope it helps anyways.
This issue is caused by using glibc >= 2.33 on the container and an outdated version of the Docker engine on the host.
You can fix it by patching glibc in your container:
patched_glibc=glibc-linux4-2.33-4-x86_64.pkg.tar.zst
curl -LO https://repo.archlinuxcn.org/x86_64/$patched_glibc
bsdtar -C / -xvf $patched_glibc
Thanks to lxqt-panel for the workaround.
/var/www/html/talent-media.com/public_html/help/scp/apps/.htaccess
shows up, but there is no .htaccess file as per
[root#0rcan0mic apps]# ls -al
total 12
drwxr-xr-x. 2 root root 4096 Apr 28 00:05 .
drwxr-xr-x. 6 root root 4096 Mar 20 01:11 ..
-rw-r--r--. 1 root root 1349 Mar 20 01:11 dispatcher.php
[root#0rcan0mic apps]# pwd
/var/www/html/talent-media.com/public_html/help/scp/apps
[root#0rcan0mic apps]#
Thoughts?
I want to cross compile vim on Ubuntu 16.04 LTS for armv7. When I try to configure, I got the error:
…
checking for tgetent in -lcurses... no
no terminal library found
checking for tgetent()... configure: error: NOT FOUND!
You need to install a terminal library; for example ncurses.
Or specify the name of the library with --with-tlib.
Therefore, I cross compiled ncurses and I install ncurses for arm in ~/work/ncurses/install:
#~/work/ncurses/install# l
insgesamt 12K
drwxrwxr-x 2 root root 4,0K Sep 3 16:56 bin
drwxrwxr-x 2 root root 4,0K Sep 3 16:56 lib
drwxrwxr-x 5 root root 4,0K Sep 3 16:56 usr
#~/work/ncurses/install# cd bin
#~/work/ncurses/install/bin# l
insgesamt 192K
lrwxrwxrwx 1 root root 23 Sep 3 16:56 arm-linux-gnueabihf-captoinfo -> arm-linux-gnueabihf-tic
-rwxr-xr-x 1 root root 8,3K Sep 3 16:56 arm-linux-gnueabihf-clear
-rwxr-xr-x 1 root root 47K Sep 3 16:56 arm-linux-gnueabihf-infocmp
lrwxrwxrwx 1 root root 23 Sep 3 16:56 arm-linux-gnueabihf-infotocap -> arm-linux-gnueabihf-tic
lrwxrwxrwx 1 root root 24 Sep 3 16:56 arm-linux-gnueabihf-reset -> arm-linux-gnueabihf-tset
-rwxr-xr-x 1 root root 14K Sep 3 16:56 arm-linux-gnueabihf-tabs
-rwxr-xr-x 1 root root 51K Sep 3 16:56 arm-linux-gnueabihf-tic
-rwxr-xr-x 1 root root 14K Sep 3 16:56 arm-linux-gnueabihf-toe
-rwxr-xr-x 1 root root 14K Sep 3 16:56 arm-linux-gnueabihf-tput
-rwxr-xr-x 1 root root 20K Sep 3 16:56 arm-linux-gnueabihf-tset
-rwxr-xr-x 1 root root 5,2K Sep 3 16:56 ncurses5-config
#~/work/ncurses/install/bin# l ../lib
insgesamt 1004K
lrwxrwxrwx 1 root root 12 Sep 3 16:56 libcurses.a -> libncurses.a
lrwxrwxrwx 1 root root 17 Sep 3 16:56 libcurses.so -> libncurses.so.5.9
-rw-r--r-- 1 root root 79K Sep 3 16:56 libform.a
lrwxrwxrwx 1 root root 12 Sep 3 16:56 libform.so -> libform.so.5
lrwxrwxrwx 1 root root 14 Sep 3 16:56 libform.so.5 -> libform.so.5.9
-rwxrwxr-x 1 root root 49K Sep 3 16:56 libform.so.5.9
-rw-r--r-- 1 root root 44K Sep 3 16:56 libmenu.a
lrwxrwxrwx 1 root root 12 Sep 3 16:56 libmenu.so -> libmenu.so.5
lrwxrwxrwx 1 root root 14 Sep 3 16:56 libmenu.so.5 -> libmenu.so.5.9
-rwxrwxr-x 1 root root 30K Sep 3 16:56 libmenu.so.5.9
-rw-r--r-- 1 root root 377K Sep 3 16:56 libncurses.a
-rw-r--r-- 1 root root 128K Sep 3 16:56 libncurses++.a
lrwxrwxrwx 1 root root 15 Sep 3 16:56 libncurses.so -> libncurses.so.5
lrwxrwxrwx 1 root root 17 Sep 3 16:56 libncurses.so.5 -> libncurses.so.5.9
-rwxrwxr-x 1 root root 230K Sep 3 16:56 libncurses.so.5.9
-rw-r--r-- 1 root root 19K Sep 3 16:56 libpanel.a
lrwxrwxrwx 1 root root 13 Sep 3 16:56 libpanel.so -> libpanel.so.5
lrwxrwxrwx 1 root root 15 Sep 3 16:56 libpanel.so.5 -> libpanel.so.5.9
-rwxrwxr-x 1 root root 13K Sep 3 16:56 libpanel.so.5.9
#~/work/ncurses/install/bin# l ../usr
insgesamt 12K
drwxrwxr-x 2 root root 4,0K Sep 3 16:56 include
drwxrwxr-x 6 root root 4,0K Sep 3 16:56 man
drwxrwxr-x 4 root root 4,0K Sep 3 16:56 share
I try now to configure with --with-tlib=~/work/ncurses/install/lib but I get the error:
…
checking for stack_t... yes
checking whether stack_t has an ss_base field... no
checking --with-tlib argument... ~/work/ncurses/install/lib
checking for linking with ~/work/ncurses/install/lib library... configure: error: FAILED
How can I make it work?
Thanks in advance.
full configure:
export TARGET=arm-linux-gnueabihf
LDFLAGS=-L~/work/ncurses/install/lib ./configure --target=$TARGET --prefix=$PREFIX --with-sysroot=$TARGET --with-arch=$TARGET CC=arm-linux-gnueabihf-gcc --host=$TARGET --with-tlib=ncurses
Finally I succeeded:
export TARGET=arm
export LDFLAGS=-L$HOME/work/ncurses/install/lib
export PREFIX=$HOME/work/vim2/build
./configure --build=$TARGET --host=$TARGET --prefix=/usr --enable-multibyte --enable-gui=no -disable-gtktest --disable-xim --with-features=normal --disable-gpm --without-x --disable-netbeans --with-tlib=ncurses
make -j4 CC=arm-linux-gnueabihf-gcc
make DESTDIR=/root/work/vim2/install CC=arm-linux-gnueabihf-gcc install