Opened 10 years ago

Closed 10 years ago

#43561 closed defect (fixed)

srecord-1.63

Reported by: alinp@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: brendan.simon@…, hardwhack
Port: srecord

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Hi...I'm trying my had at updating the port for srecord to be current (v 1.63) and I'm running into a strange issue. I get a failure running MacPorts for an install operation when I run:

$ sudo port -d install srecord

the error I get is :

...
make: Entering directory `/opt/local/var/macports/build/_Users_alinp_MacPorts_devel_srecord/srecord/work/srecord-1.63'
libtool --mode=install /usr/bin/install -c bin/srec_cat /opt/local/bin/srec_cat
libtool: install: /usr/bin/install -c bin/.libs/srec_cat /opt/local/bin/srec_cat
install: /opt/local/bin/srec_cat: Operation not permitted
make: *** [/opt/local/bin/srec_cat] Error 71
make: Leaving directory `/opt/local/var/macports/build/_Users_alinp_MacPorts_devel_srecord/srecord/work/srecord-1.63'
Command failed:  cd "/opt/local/var/macports/build/_Users_alinp_MacPorts_devel_srecord/srecord/work/srecord-1.63" && /usr/bin/make -w install prefix=/opt/local/var/macports/build/_Users_alinp_MacPorts_devel_srecord/srecord/work/destroot/opt/local 
Exit code: 2
Error: org.macports.destroot for port srecord returned: command execution failed
DEBUG: Error code: CHILDSTATUS 6359 2
DEBUG: Backtrace: command execution failed
    while executing
"system -nice 0 $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec destroot"
    (procedure "portdestroot::destroot_main" line 2)
    invoked from within
"$procedure $targetname"

but if I run the offending command on the command line as follows:

$ sudo /usr/bin/install -c bin/.libs/srec_cat /opt/local/bin/srec_cat

it all works fine. Why would I get an error like this when running the port command but I don't when I run at the command line? Sorry if this is a dumb question...I really did look everywhere I could think of for an answer before posting this.

Thanks!

Alin

Change History (9)

comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

Because the port is not respecting the restrictions MacPorts enforces. MacPorts requires ports to install files within the workpath, more specifically within the destroot, usually. This port is trying to install directly to the prefix, which is prohibited.

comment:2 in reply to:  1 Changed 10 years ago by alinp@…

Replying to ryandesign@…:

Because the port is not respecting the restrictions MacPorts enforces. MacPorts requires ports to install files within the workpath, more specifically within the destroot, usually. This port is trying to install directly to the prefix, which is prohibited.

Thanks Ryan...I'll look at the port from that perspective and see what needs to be done to make it honor destroot.

comment:3 Changed 10 years ago by 511175007@…

Cc: 511175007@… added

Cc Me!

comment:4 Changed 10 years ago by 511175007@…

Cc: 511175007@… removed

Cc Me!

comment:5 Changed 10 years ago by mf2k (Frank Schima)

Can you post a patch with your Portfile work? I'm seeing the following error when I try to update:

:debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_mports_trunk_dports_devel_srecord/srecord/work/srecord-1.63" && /usr/bin/make -j8 -w all'
:debug:build Executing command line:  cd "/opt/local/var/macports/build/_opt_mports_trunk_dports_devel_srecord/srecord/work/srecord-1.63" && /usr/bin/make -j8 -w all 
:info:build make: Entering directory `/opt/local/var/macports/build/_opt_mports_trunk_dports_devel_srecord/srecord/work/srecord-1.63'
:info:build libtool --mode=compile --tag=CXX /usr/bin/clang++ -I/opt/local/include -pipe -Os -arch x86_64 -stdlib=libc++ -I. \
:info:build 		-c srec_cat/arglex3.cc -o srec_cat/arglex3.lo
:info:build libtool --mode=compile --tag=CXX /usr/bin/clang++ -I/opt/local/include -pipe -Os -arch x86_64 -stdlib=libc++ -I. \
:info:build 		-c srec_cat/main.cc -o srec_cat/main.lo
:info:build libtool: unknown option character `-' in: --mode=compile

comment:6 Changed 10 years ago by mf2k (Frank Schima)

Cc: brendan.simon@… pjkim00@… added

Cc reporters of similar tickets #38852 and #42304.

comment:7 Changed 10 years ago by alinp@…

Yes...I'm getting that same error. I'm still working on the PortFile and in some cases, I'm getting past the error by brute force so I can see what lays ahead. I'm new to the standard build system so I'm getting a chance to learn about configure, etc.

So far, I've modified the PortFile to bring in all of the dependencies (libtool, libgcrypt, Boost, Ghostscript) and that all seems to work but when I bring in libtool, the executable in /opt/local/bin is called 'glibtool' and the build files for srecord are looking for 'libtool' and it finds that as the Apple 'libtool' which gives the error you are seeing. I tried putting this in the PortFile

build.args        LIBTOOL=${prefix}/bin/glibtool
build.env         LIBTOOL=${prefix}/bin/glibtool

which didn't seem to help a whole lot. I also tried putting in a soft link to 'glibtool' in /opt/local/bin and that didn't work either.

My brute force bypass was to just rename 'glibtool' to 'libtool' in /opt/local/bin and then I got past all of those errors and now I'm stuck on the error I first reported which as Ryan said, appears to be the build files trying to directly install into /usr/bin instead of destroot.

I'll have to circle back and put in real fixes for the libtool error after I fix the install issue. After it is all working, I'll post the patch file

comment:8 in reply to:  6 Changed 10 years ago by hardwhack

Replying to mf2k@…:

Cc reporters of similar tickets #38852 and #42304.

I'm not sure why ticket #42304 was closed. This does not seem even remotely similar, much less a dupe, to #42304. First, #42304 dealt with v1.36, this deals with v1.63. #42304 addressed a compile error of "lib/interval.cc:793:19: error: call to 'to_string' is ambiguous" This appears to be a linking/library issue.

Until you get v1.63 up and working, perhaps you can leave #42304 open so that people can see how to fix the problem and build v1.36. It appears that v1.36 is still having the same compile issues that are unrelated to the problem addressed in this ticket.

comment:9 Changed 10 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: newclosed

Should be fixed by r120684.

Note: See TracTickets for help on using tickets.