#StackBounty: #ubuntu #compiling #gcc #android Swift for Android: `ld` cannot find `-lgcc` in swift for android compilation linking step

Bounty: 100

I’m trying to compile Swift code on Ubuntu 16.04 LTS, following these instructions fairly closely. I was able to download the NDK r14 okay, download the libicu tools and build them, and download the swift source and build that against the libicu tools. I get all the way down to compiling actual swift code and get this:

#build.sh 
#(I symlinked the androideabi ld.gold to /usr/bin/ld.armv7, based on a swift bug ticket's advice. Thats the only thing different from the instructions)

/home/mike/workspace/swift-source/build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/swiftc 
-use-ld=armv7 
-tools-directory /home/mike/workspace/android-ndk-r14/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/arm-linux-androideabi/bin 
-target armv7-none-linux-androideabi 
-sdk /home/mike/workspace/android-ndk-r14/platforms/android-21/arch-arm 
-L /home/mike/workspace/android-ndk-r14/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a 
-L /home/mike/workspace/android-ndk-r14/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9 
hello.swift


#output
mike@mike-VirtualBox:~/workspace/HelloSwift$ ./build.sh 
/usr/bin/ld.armv7: error: cannot find -lgcc
/usr/bin/ld.armv7: error: cannot find -lgcc
/usr/bin/ld.armv7: error: cannot find -lgcc
/usr/bin/ld.armv7: error: cannot find -lgcc

I don’t have a ton of experience being this far down the toolchain, but I deeeefinitely have gcc installed, and gcc-multilib, and LD_LIBRARY_PATH set to help ld find gcc, and I’ve rebuild the ld cache with ldconfig.


Get this bounty!!!

#StackBounty: #ubuntu #postfix #smtp #imap #courier-imap Setting up aliases with Postfix and Courier-IMAP

Bounty: 50

I have set up a Postfix mail server which uses Courier in order to provide an SMTP service. On my server there is a user called joe.

I used alias maps to make mail to test@example.com redirect to joe using test: joe in my /etc/aliases. Seeing as there is just one email address and one domain, I don’t want to use MySQL to manage aliases as this seems to be a massive overkill for my scenario.

I have two questions…

  1. People can send mail to joe@example.com as well as test@example.com and it will still go to the account joe. I don’t particularly want this, primarily as I am worried people could start spamming system user accounts. Is there a way to disable this?

  2. When I use Courrier-IMAP to login to IMAP, is there a way I can login with test or test@example.com as my username rather than joe? I would not like to create a user called test if at all possible.

Thanks 🙂


Get this bounty!!!

#StackBounty: #ubuntu #windows-10 #virtual-machine #vagrant Error trying to add vagrant box ubuntu/wily64

Bounty: 50

For some reason I can’t download the ubuntu-wily box

$ vagrant box add ubuntu/wily64
==> box: Loading metadata for box 'ubuntu/wily64'
    box: URL: https://atlas.hashicorp.com/ubuntu/wily64
==> box: Adding box 'ubuntu/wily64' (v20160715.0.0) for provider: virtualbox
    box: Downloading: https://atlas.hashicorp.com/ubuntu/boxes/wily64/versions/20160715.0.0/providers/virtualbox.box
    box:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

The requested URL returned error: 404 Not Found

This is strange because I can download xenial and trusty boxes with no issue:

$ vagrant box add ubuntu/trusty64
==> box: Loading metadata for box 'ubuntu/trusty64'
    box: URL: https://atlas.hashicorp.com/ubuntu/trusty64
==> box: Adding box 'ubuntu/trusty64' (v20170216.0.0) for provider: virtualbox
    box: Downloading: https://atlas.hashicorp.com/ubuntu/boxes/trusty64/versions/20170216.0.0/providers/virtualbox.box
    box: Progress: 51% (Rate: 910k/s, Estimated time remaining: 0:04:04)

Note that I was using this box on the same setup for weeks with no issues. When I noticed the issue I tried downgrading from 1.9.1 to 1.8.7 to see if the issue was solved.. it is not.

My development machine is running windows10 64bit, and here is my vagrant version info:

$ vagrant version
Installed Version: 1.8.7
Latest Version: 1.9.1

Edit Just tried this on my windows7 64bit laptop and got the same error. Maybe this is a bug on hashicorp’s side?


Get this bounty!!!

#StackBounty: #ubuntu #samba #samba4 Samba mount is empty when mounted with nounix

Bounty: 50

For years this has worked and today it stopped.

I have a Debian 8 server running Samba 4.2.10 to provide some shares to Windows 10 and Ubuntu 16.04 machines on a LAN.

This morning the ubuntu machines have apparently mounted shares but they’re empty.

Server smb.conf:

[global]
  workgroup = PAP
  server string = Hello there.
  obey pam restrictions = Yes
  pam password change = Yes
  unix password sync = Yes
  syslog = 0
  log file = /var/log/samba/log
  log level = 3
  socket options = TCP_NODELAY SO_SNDBUF=16384
  dns proxy = No
  wins support = Yes
  valid users = pap,rich
  hosts allow = 10.0., 127.
  # shares default to rw, pap.pap, open perms
  read only = No
  force user = pap
  force group = pap
  create mask = 0666
  force create mode = 0666
  directory mask = 0777
  force directory mode = 02777

[org]
  comment = Main Files Space
  path = /home/org

And on the Ubuntu client (cifs-utils v6.4), I’ve been connecting with

mount -t cifs -o rw,nobrl,gid=pap,username=pap,password=****,file_mode=0666,dir_mode=0666,nounix 
   //server/org /mnt/org

If I mount without the nounix option then I can see the files. The nounix option is important because symlinks are otherwise treated differently between Windows and Ubuntu machines. No errors are generated AFAICS.

Edit: what do the logs say?

Server

The (Debian 8) server does not append anything to the logs (at /var/log/samba/*) when the share is mounted with or without nounix. Neither does anything show up monitoring journalctl -u smbd

I did ramp up Samba’s logging on the server but it’s kinda all or nothing and I did not see anything pertaining to the mount that was of help.

Client

The client (Ubuntu 16.04) does not appear to log anything in /var/log/syslog.

Following instructions on what looks like an old but remarkably similar bug report which are:

echo 1 | sudo tee /proc/fs/cifs/cifsFYI
sudo dmesg -c >/dev/null
sudo mount ...
sudo ls /mount-point/
sudo dmesg -c

outputs nothing.

I also ran these commands after doing echo 1 | sudo tee /proc/fs/cifs/traceSMB. This did generate output (lots of hexdumped binary). I can post these hexdumps with and without the nounix if they’re of interest…


Get this bounty!!!

#StackBounty: #ubuntu #vpn #openvpn VPN connects from home but not from work or mobile data

Bounty: 100

I have OpenVPN configured on an Ubuntu 16.04 server. I am able to use this VPN service from one network but not from others and would appreciate any help.

Home Network
Everything works fine. I am able to connect to the VPN and browse webpages from different devices (macbook and android phone).

Work Network
VPN client connects but I am unable to browse webpages on any device.
Pinging hostname works so it may not be a DNS issue.
Browser pages get stuck on connecting till they timeout.
Slack client does not connect however the Dropbox client does report being connected.

Mobile Data
Same as work network.

Server Config

port 443
proto udp
dev tun
sndbuf 0
rcvbuf 0
ca ca.crt
cert server.crt
key server.key
dh dh.pem
tls-auth ta.key 0
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
keepalive 10 120
cipher AES-256-CBC
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
crl-verify crl.pem

Client Config

client
dev tun
proto udp
sndbuf 0
rcvbuf 0
remote x.x.x.x 443  #My Server's IPAddress
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
cipher AES-256-CBC
comp-lzo
setenv opt block-outside-dns
key-direction 1
verb 3

Although this config uses port 443 I had the same problem while using the default port 1194.
I have also experimented by changing the DNS push configuration and using Google DNS servers but this does not make any difference.

Hoping someone can help.


Get this bounty!!!

#StackBounty: #windows-7 #ubuntu #bios #mbr #gpt Windows bootable USB- The selected disk is of GPT partition style

Bounty: 50

I know this question has been asked a million times before this, but I can’t find any suitable answer so please bear with me.

In brief: I want to dual-boot Ubuntu 14.04 and Windows 7 Ultimate. There was a slight hiccup at the fact that I had Ubuntu installed first, but I managed to handle that. I have 450 GBs of space on a partition on my HDD in NTFS (this is the partition where I want to install Windows). My HDD has been GPT since the start and my motherboard (MSI 970 Gaming) definitely supports UEFI+Legacy. So everything is okay on that front, but the windows installer still warned “The selected disk is of GPT partition style.”

After asking around on some Ubuntu forums, I was told there is something called IOMMU that has to be enabled, and that its supposed to be available on the 970 chipset, but I couldn’t find that option in my BIOS (MSI click BIOS 4). After further research I came to know some motherboard manufacturers choose not to include that option and I chose to go with that explanation (please correct me here if I can’t see big red buttons screaming “IOMMU”).

I have backed up all my Ubuntu data and formatting the entire disk is an option that can be availed of, but I would prefer not to have it that way. Additonally, I want to actually get Windows 7 to work with GPT rather than just re-formatting the whole drive to MBR and calling it a day. An Ubuntu live USB is also something that can be used if required (I have one at ready).

I don’t understand what I’m doing wrong. Please help me out of this spot of bother.

Thanks


Get this bounty!!!

#StackBounty: Program for mass-managing audio cards

Bounty: 50

I am looking to do simultaneous translation of a conference we are hosting. I would prefer to have the mixing for this project on computer; ideally Ubuntu, as that is what I am the most familiar with. Basically, the software must be able to:

  1. Input from one audio card (wired to speaker’s mic)
  2. Record from that input
  3. Output that input to an output on the same card (earphones for me)*
  4. Input from a second audio card (microphone for me)
  5. Output to the second audio card (to a mixer attached to the earphones of those who are having the simultaneous translation done)

What are my options? Is there such a program on Ubuntu?

* This would be optional, since I could split the signal to 1. the computer for recording and 2. my earphones


Get this bounty!!!

#StackBounty: How do you create a new user to login with for Amazon Ubuntu EC2?

Bounty: 50

I really don’t like using my root user with no password to use for logging in an Amazon EC2 ubuntu instance. I would like to login without the certificate if possible. I had seen a tutorial where they said you can, but they didn’t explain how to do it.

adduser newuser
gpasswd -a user sudo

That’s as far as I got. Creating a newuser username and giving them sudo priviledges. I know there has to be something I am missing for linking this to a login.


Get this bounty!!!