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

phcpack release 2.4.88 #949

Merged
merged 6 commits into from
Jan 24, 2024
Merged

Conversation

janverschelde
Copy link
Contributor

No description provided.

@Fabien-Chouteau
Copy link
Member

Hi @janverschelde ,

There's a link error on Fedora:

  [index]        libmain.a
   [link]         phctop.adb
/usr/bin/ld: cannot find -lstdc++: No such file or directory
collect2: error: ld returned 1 exit status
gprbuild: link of phctop.adb failed
gprbuild: failed command was: /usr/bin/g++ phctop.o /tmp/GNAT-TEMP-000014.TMP libmain.a -static-libstdc++ -L/home/runner/work/alire-index/alire-index/phcpack_2.4.88_e448e94a/obj/ -L/home/runner/work/alire-index/alire-index/phcpack_2.4.88_e448e94a/obj/ -L/usr/lib/gcc/x86_64-redhat-linux/13/adalib/ -lgnarl -lgnat -lrt -lpthread -lm -ldl -Wl,-rpath-link,/usr/lib/gcc/x86_64-redhat-linux/13//adalib -shared-libgcc -Wl,-z,origin,-rpath,$ORIGIN/..//obj:/usr/lib/gcc/x86_64-redhat-linux/13/adalib -o /home/runner/work/alire-index/alire-index/phcpack_2.4.88_e448e94a/bin//phc

It could be a problem with the environment setup. What do you think @mosteo ?

@janverschelde
Copy link
Contributor Author

Thanks for looking into this. That is fails on fedora is unfortunate,
especially given that most of the development happened on Red Hat Linux.

@mgrojo
Copy link
Contributor

mgrojo commented Jan 4, 2024

Thanks for looking into this. That is fails on fedora is unfortunate, especially given that most of the development happened on Red Hat Linux.

You lack a dependency on the libstdc++-static package. Tested with docker run -it ghcr.io/alire-project/docker/gnat:fedora-latest.

[root@11dc42e0d0d9 tmp]# /usr/bin/g++ -static-libstdc++  hello.cpp
/usr/bin/ld: cannot find -lstdc++: No such file or directory
collect2: error: ld returned 1 exit status
[root@11dc42e0d0d9 tmp]# yum install libstdc++-static
Last metadata expiration check: 0:01:46 ago on Thu Jan  4 19:48:33 2024.
Dependencies resolved.
================================================================================
 Package                Architecture Version                Repository     Size
================================================================================
Installing:
 libstdc++-static       x86_64       13.2.1-4.fc38          updates       909 k
Upgrading:
 cpp                    x86_64       13.2.1-4.fc38          updates        11 M
 gcc                    x86_64       13.2.1-4.fc38          updates        34 M
 gcc-c++                x86_64       13.2.1-4.fc38          updates        13 M
 gcc-gnat               x86_64       13.2.1-4.fc38          updates        17 M
 libgcc                 x86_64       13.2.1-4.fc38          updates       111 k
 libgnat                x86_64       13.2.1-4.fc38          updates       1.4 M
 libgnat-devel          x86_64       13.2.1-4.fc38          updates       4.6 M
 libgomp                x86_64       13.2.1-4.fc38          updates       320 k
 libstdc++              x86_64       13.2.1-4.fc38          updates       865 k
 libstdc++-devel        x86_64       13.2.1-4.fc38          updates       2.6 M

Transaction Summary
================================================================================
Install   1 Package
Upgrade  10 Packages

Total download size: 86 M
Is this ok [y/N]: y
Downloading Packages:
(1/11): libstdc++-static-13.2.1-4.fc38.x86_64.r 1.0 MB/s | 909 kB     00:00    
(2/11): cpp-13.2.1-4.fc38.x86_64.rpm            5.0 MB/s |  11 MB     00:02    
(3/11): gcc-c++-13.2.1-4.fc38.x86_64.rpm        5.0 MB/s |  13 MB     00:02    
(4/11): libgcc-13.2.1-4.fc38.x86_64.rpm         245 kB/s | 111 kB     00:00    
(5/11): gcc-gnat-13.2.1-4.fc38.x86_64.rpm       6.3 MB/s |  17 MB     00:02    
(6/11): libgnat-13.2.1-4.fc38.x86_64.rpm        1.5 MB/s | 1.4 MB     00:00    
(7/11): libgnat-devel-13.2.1-4.fc38.x86_64.rpm  8.4 MB/s | 4.6 MB     00:00    
(8/11): libgomp-13.2.1-4.fc38.x86_64.rpm        598 kB/s | 320 kB     00:00    
(9/11): libstdc++-13.2.1-4.fc38.x86_64.rpm      5.5 MB/s | 865 kB     00:00    
(10/11): libstdc++-devel-13.2.1-4.fc38.x86_64.r 6.3 MB/s | 2.6 MB     00:00    
(11/11): gcc-13.2.1-4.fc38.x86_64.rpm           5.2 MB/s |  34 MB     00:06    
--------------------------------------------------------------------------------
Total                                            12 MB/s |  86 MB     00:07     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Upgrading        : libgcc-13.2.1-4.fc38.x86_64                           1/21 
  Running scriptlet: libgcc-13.2.1-4.fc38.x86_64                           1/21 
  Upgrading        : libstdc++-13.2.1-4.fc38.x86_64                        2/21 
  Upgrading        : libstdc++-devel-13.2.1-4.fc38.x86_64                  3/21 
  Upgrading        : libgnat-13.2.1-4.fc38.x86_64                          4/21 
  Upgrading        : libgomp-13.2.1-4.fc38.x86_64                          5/21 
  Upgrading        : libgnat-devel-13.2.1-4.fc38.x86_64                    6/21 
  Upgrading        : cpp-13.2.1-4.fc38.x86_64                              7/21 
  Upgrading        : gcc-13.2.1-4.fc38.x86_64                              8/21 
  Upgrading        : gcc-c++-13.2.1-4.fc38.x86_64                          9/21 
  Upgrading        : gcc-gnat-13.2.1-4.fc38.x86_64                        10/21 
  Installing       : libstdc++-static-13.2.1-4.fc38.x86_64                11/21 
  Cleanup          : gcc-c++-13.1.1-4.fc38.x86_64                         12/21 
  Cleanup          : gcc-gnat-13.1.1-4.fc38.x86_64                        13/21 
  Cleanup          : libstdc++-devel-13.1.1-4.fc38.x86_64                 14/21 
  Cleanup          : libgnat-devel-13.1.1-4.fc38.x86_64                   15/21 
  Cleanup          : libstdc++-13.1.1-4.fc38.x86_64                       16/21 
  Cleanup          : gcc-13.1.1-4.fc38.x86_64                             17/21 
  Cleanup          : libgnat-13.1.1-4.fc38.x86_64                         18/21 
  Cleanup          : libgcc-13.1.1-4.fc38.x86_64                          19/21 
  Running scriptlet: libgcc-13.1.1-4.fc38.x86_64                          19/21 
  Cleanup          : cpp-13.1.1-4.fc38.x86_64                             20/21 
  Cleanup          : libgomp-13.1.1-4.fc38.x86_64                         21/21 
  Running scriptlet: libgomp-13.1.1-4.fc38.x86_64                         21/21 
  Verifying        : libstdc++-static-13.2.1-4.fc38.x86_64                 1/21 
  Verifying        : cpp-13.2.1-4.fc38.x86_64                              2/21 
  Verifying        : cpp-13.1.1-4.fc38.x86_64                              3/21 
  Verifying        : gcc-13.2.1-4.fc38.x86_64                              4/21 
  Verifying        : gcc-13.1.1-4.fc38.x86_64                              5/21 
  Verifying        : gcc-c++-13.2.1-4.fc38.x86_64                          6/21 
  Verifying        : gcc-c++-13.1.1-4.fc38.x86_64                          7/21 
  Verifying        : gcc-gnat-13.2.1-4.fc38.x86_64                         8/21 
  Verifying        : gcc-gnat-13.1.1-4.fc38.x86_64                         9/21 
  Verifying        : libgcc-13.2.1-4.fc38.x86_64                          10/21 
  Verifying        : libgcc-13.1.1-4.fc38.x86_64                          11/21 
  Verifying        : libgnat-13.2.1-4.fc38.x86_64                         12/21 
  Verifying        : libgnat-13.1.1-4.fc38.x86_64                         13/21 
  Verifying        : libgnat-devel-13.2.1-4.fc38.x86_64                   14/21 
  Verifying        : libgnat-devel-13.1.1-4.fc38.x86_64                   15/21 
  Verifying        : libgomp-13.2.1-4.fc38.x86_64                         16/21 
  Verifying        : libgomp-13.1.1-4.fc38.x86_64                         17/21 
  Verifying        : libstdc++-13.2.1-4.fc38.x86_64                       18/21 
  Verifying        : libstdc++-13.1.1-4.fc38.x86_64                       19/21 
  Verifying        : libstdc++-devel-13.2.1-4.fc38.x86_64                 20/21 
  Verifying        : libstdc++-devel-13.1.1-4.fc38.x86_64                 21/21 

Upgraded:
  cpp-13.2.1-4.fc38.x86_64              gcc-13.2.1-4.fc38.x86_64               
  gcc-c++-13.2.1-4.fc38.x86_64          gcc-gnat-13.2.1-4.fc38.x86_64          
  libgcc-13.2.1-4.fc38.x86_64           libgnat-13.2.1-4.fc38.x86_64           
  libgnat-devel-13.2.1-4.fc38.x86_64    libgomp-13.2.1-4.fc38.x86_64           
  libstdc++-13.2.1-4.fc38.x86_64        libstdc++-devel-13.2.1-4.fc38.x86_64   
Installed:
  libstdc++-static-13.2.1-4.fc38.x86_64                                         

Complete!
[root@11dc42e0d0d9 tmp]# /usr/bin/g++ -static-libstdc++  hello.cpp
[root@11dc42e0d0d9 tmp]#
[root@11dc42e0d0d9 tmp]# ./a.out
Hello World![root@11dc42e0d0d9 tmp]# 

@janverschelde
Copy link
Contributor Author

Is this dependency something that should be specified in the toml file?
If yes, then how to do it?

@mgrojo
Copy link
Contributor

mgrojo commented Jan 5, 2024

added dependency
the file aims to declare the dependency on libstdc++static
@janverschelde
Copy link
Contributor Author

Thanks for the example. I tried to add the file to declare the dependency on the statically linked c++ libraries...

removed empty lines
@mosteo
Copy link
Member

mosteo commented Jan 19, 2024

Hi @janverschelde, there seems to be a problem in the checks for the new external definition, but this is on my plate as the definition seems correct. Thanks for your patience.

@mosteo
Copy link
Member

mosteo commented Jan 23, 2024

@janverschelde , the problem is with the location of the libstdcpp.toml file. It should be placed inside index/li/libstdcpp, as any regular crate. I'll do the move, just so you know for another time.

@janverschelde
Copy link
Contributor Author

Thank you very much for this fix. What is the next step?

@mosteo
Copy link
Member

mosteo commented Jan 23, 2024

There seems to be some issue with the regex that detects versions on Fedora; this is really unfortunate because even if I fix it in alr, we cannot have this merged into the current index as-is since it would break things for all Fedora users.

I'm looking at it right now but if things turn out as they seem, the proper fix will require a new index version in tandem with the next alr release.

To not delay merging your crate until then, I would leave your crate without the libstdc++ dependency, remove the c++ Fedora external, and document somewhere in your project that libstdc++ must be installed in the system. Let me tweak the manifests to see if things work as expected, so you have to do nothing really.

Keep libstdc++ external separate for the future.
Copy link
Member

@mosteo mosteo left a comment

Choose a reason for hiding this comment

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

Merging with the expected failure on Fedora; remember to make a note somewhere that libstdc++-static must be installed.

@mosteo mosteo changed the title phpack release 2.4.88 phcpack release 2.4.88 Jan 24, 2024
@mosteo mosteo merged commit 188820d into alire-project:stable-1.2.1 Jan 24, 2024
14 of 15 checks passed
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.

4 participants