Skip to content

Conversation

@nojaf
Copy link

@nojaf nojaf commented Jan 28, 2018

Should resolve perl : warning : Setting locale failed. warnings when using dotnet restore.

Should resolve `perl : warning : Setting locale failed. ` warnings when using `dotnet restore`.
@ninjarobot ninjarobot self-requested a review January 30, 2018 02:15
apt-get purge -y autoconf libtool make automake && \
apt-get clean

RUN apt-get update \
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nojaf thank you for the contribution. Is it necessary to add this package or is it sufficient to just enable the C.UTF-8 locale with this directive?

ENV LANG C.UTF-8

From the Debian base image:

Given that it is a faithful "minbase" install of Debian, this image only includes the C, C.UTF-8, and POSIX locales by default. For most uses requiring a UTF-8 locale, C.UTF-8 is likely sufficient (-e LANG=C.UTF-8 or ENV LANG C.UTF-8).

I would try this myself, but I'm not sure how to reproduce the issue.

@nojaf
Copy link
Author

nojaf commented Jan 30, 2018

Hi @ninjarobot I had the problem when restoring a giraffe template. I'll try your ENV solution on my project.

@nojaf
Copy link
Author

nojaf commented Jan 30, 2018

I'm sorry, ENV LANG C.UTF-8 doesn't work for me.

Output of dotnet restore:

root@903c326c225b:/usr/src/app/src/Teams# dotnet restore
perl : warning : Setting locale failed. [/usr/src/app/src/Teams/Teams.fsproj]
perl : warning : Please check that your locale settings: [/usr/src/app/src/Teams/Teams.fsproj]
        LANGUAGE = (unset),
        LC_ALL = "en_US.UTF-8",
        LANG = "en_US.UTF-8"
      are supported and installed on your system.
perl : warning : Falling back to the standard locale ("C"). [/usr/src/app/src/Teams/Teams.fsproj]
  b033cf2d65b8ad80509912368e7d1ba31efd1a9f
perl : warning : Setting locale failed. [/usr/src/app/src/Teams/Teams.fsproj]
perl : warning : Please check that your locale settings: [/usr/src/app/src/Teams/Teams.fsproj]
        LANGUAGE = (unset),
        LC_ALL = "en_US.UTF-8",
        LANG = "en_US.UTF-8"
      are supported and installed on your system.
perl : warning : Falling back to the standard locale ("C"). [/usr/src/app/src/Teams/Teams.fsproj]
  c11bb43dd3943fa291f31652c7a931b8e7338af6
  Paket version 5.132.4
  Performance:
   - Disk IO: 239 milliseconds
   - Runtime: 10 seconds
perl : warning : Setting locale failed. [/usr/src/app/src/Teams/Teams.fsproj]
perl : warning : Please check that your locale settings: [/usr/src/app/src/Teams/Teams.fsproj]
        LANGUAGE = (unset),
        LC_ALL = "en_US.UTF-8",
        LANG = "en_US.UTF-8"
      are supported and installed on your system.
perl : warning : Falling back to the standard locale ("C"). [/usr/src/app/src/Teams/Teams.fsproj]
  c11bb43dd3943fa291f31652c7a931b8e7338af6
perl : warning : Setting locale failed. [/usr/src/app/src/Teams/Teams.fsproj]
perl : warning : Please check that your locale settings: [/usr/src/app/src/Teams/Teams.fsproj]
        LANGUAGE = (unset),
        LC_ALL = "en_US.UTF-8",
        LANG = "en_US.UTF-8"
      are supported and installed on your system.
perl : warning : Falling back to the standard locale ("C"). [/usr/src/app/src/Teams/Teams.fsproj]
  c11bb43dd3943fa291f31652c7a931b8e7338af6

@nojaf
Copy link
Author

nojaf commented Feb 6, 2018

Maybe it's one of the packages in my paket.dependencies that triggers the perl warning.
I believe you should be able to reproduce the problem with

source https://www.nuget.org/api/v2
cache /cache/nupkgs versions: current
nuget FSharp.Core
nuget FSharp.Data 2.4.3
nuget Microsoft.AspNetCore.Cors 2.0.1
nuget Microsoft.AspNetCore.Hosting 2.0.1
nuget Microsoft.AspNetCore.Server.Kestrel 2.0.1
nuget Microsoft.AspNetCore.StaticFiles 2.0.1
nuget Microsoft.Extensions.Configuration.Binder 2.0.0
nuget Microsoft.Extensions.Logging.Console 2.0.0
nuget Microsoft.Extensions.Logging.Debug 2.0.0
nuget MySqlConnector 0.33.1
nuget runtime.linux-x64.Microsoft.NETCore.App 2.0.3
nuget runtime.linux-x64.Microsoft.NETCore.DotNetAppHost 2.0.3
nuget runtime.linux-x64.Microsoft.NETCore.DotNetHostPolicy 2.0.3
nuget runtime.linux-x64.Microsoft.NETCore.DotNetHostResolver 2.0.3
nuget SQLProvider 1.1.23 framework: net451
nuget System.Runtime.InteropServices.RuntimeInformation 4.3.0
nuget Giraffe
github fsprojects/FSharp.TypeProviders.SDK fsc.props

clitool Microsoft.DotNet.Watcher.Tools
nuget Microsoft.Extensions.Configuration.Json 2.0.0
nuget Microsoft.Extensions.Caching.Memory 2.0.0
nuget Serilog.Sinks.File 4.0.0
nuget Serilog.Extensions.Logging 2.0.2
nuget Serilog.Extensions.Logging.File 2.0.0-dev-00023 dev
nuget Serilog.Settings.Configuration 2.4.1-dev-00070 dev
nuget Serilog.AspNetCore 2.1.0
nuget Serilog.Sinks.Console 3.1.1

paket.references

FSharp.Core
FSharp.Data
MySqlConnector
SQLProvider
System.Runtime.InteropServices.RuntimeInformation
Giraffe
Microsoft.AspNetCore.Hosting
Microsoft.AspNetCore.Cors
Microsoft.AspNetCore.StaticFiles
Microsoft.Extensions.Logging
Microsoft.Extensions.Logging.Console
Microsoft.Extensions.Logging.Debug
Microsoft.AspNetCore.Server.Kestrel
Microsoft.Extensions.Configuration.FileExtensions
Microsoft.Extensions.Configuration
Microsoft.Extensions.Configuration.Binder
Microsoft.Extensions.Configuration.Json
Microsoft.Extensions.Caching.Memory
Serilog.Sinks.File
Serilog.Extensions.Logging
Serilog.Extensions.Logging.File
Serilog.Settings.Configuration
Serilog.AspNetCore
Serilog.Sinks.Console

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

Successfully merging this pull request may close these issues.

2 participants